aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-12-22 10:35:53 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2017-12-22 10:36:37 -0800
commit9758720a24d7cc9782579bb237d747d32cf72835 (patch)
tree4032d5768f3cac0c28c17d01c29d7db7830a3b3f /src/Text
parent279c254007601de5cb6a44e0d51522748880d732 (diff)
downloadpandoc-9758720a24d7cc9782579bb237d747d32cf72835.tar.gz
RST writer: fix anchors for headers.
We were missing an `_`. See #4188.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/RST.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs
index 42d4d0040..515276985 100644
--- a/src/Text/Pandoc/Writers/RST.hs
+++ b/src/Text/Pandoc/Writers/RST.hs
@@ -250,7 +250,7 @@ blockToRST (Header level (name,classes,_) inlines) = do
let headerChar = if level > 5 then ' ' else "=-~^'" !! (level - 1)
let border = text $ replicate (offset contents) headerChar
let anchor | null name || name == autoId = empty
- | otherwise = ".. " <> text name <> ":" $$ blankline
+ | otherwise = ".. _" <> text name <> ":" $$ blankline
return $ nowrap $ anchor $$ contents $$ border $$ blankline
else do
let rub = "rubric:: " <> contents