From df331116aaad55c0d68b5667e84e78003179daf1 Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Fri, 1 Jan 2021 15:42:37 +1300 Subject: [PATCH] Bugfix: generate correct anchor for links. I'm pushing & popping to the path as a stack, but the anchor is right -> child. Needs to be reversed. --- src/Links.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Links.hs b/src/Links.hs index e8f8da3..e197f84 100644 --- a/src/Links.hs +++ b/src/Links.hs @@ -51,7 +51,7 @@ extractMisc [] = [] extractEl path el@(Element (Name "details" _ _) _ childs) = [Link (nodesText summary' $ nodesText childs "") "+" nullURI { - uriFragment = '#':'.':intercalate "." (map show path) + uriFragment = '#':'.':intercalate "." (map show $ reverse path) } | NodeElement summary@(Element (Name "summary" _ _) _ summary') <- childs] extractEl path el@(Element _ _ children) = extractElAttr el "href" ++ -- 2.30.2