aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/RST.hs2
-rw-r--r--test/command/3937.md2
2 files changed, 2 insertions, 2 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
diff --git a/test/command/3937.md b/test/command/3937.md
index 1d5e4238a..2f32cd172 100644
--- a/test/command/3937.md
+++ b/test/command/3937.md
@@ -3,7 +3,7 @@
# My Great Section {#mysection}
# Other section
^D
-.. mysection:
+.. _mysection:
My Great Section
================