RST writer: fix anchors for headers.
We were missing an `_`. See #4188.
This commit is contained in:
parent
279c254007
commit
9758720a24
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# My Great Section {#mysection}
|
||||
# Other section
|
||||
^D
|
||||
.. mysection:
|
||||
.. _mysection:
|
||||
|
||||
My Great Section
|
||||
================
|
||||
|
|
Loading…
Add table
Reference in a new issue