Skip to content

Commit 80515b9

Browse files
committed
Add identifier to new heading
1 parent 0f2b53a commit 80515b9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

IncludeFilter.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ import Control.Error (readMay, fromMaybe)
7575
import System.Directory
7676

7777
import Text.Pandoc
78+
import Text.Pandoc.Shared (uniqueIdent, stringify)
7879
import Text.Pandoc.Error
79-
import Text.Pandoc.Shared
8080
import Text.Pandoc.JSON
8181
import Text.Pandoc.Walk
8282

@@ -89,6 +89,7 @@ stripPandoc changeInHeaderLevel (Right (Pandoc meta blocks)) = maybe id (:) (tit
8989
guard $ changeInHeaderLevel > 0
9090
Just $ Header changeInHeaderLevel (titleRef inls,["section-title"],[]) inls
9191
title _ = Nothing
92+
-- WARNING titleRef doesn't check that titles are unique; for that try uniqueIdent.
9293
titleRef = stringify . fmap (lowerCase . dashFromSpace)
9394
dashFromSpace Space = Str "-"
9495
dashFromSpace x = x

0 commit comments

Comments
 (0)