mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-26 10:16:32 +00:00
RST writer: If label for a link reference contains a colon,
surround by ` signs so the colon won't be interpreted as the end of the link label. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1029 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
@@ -76,7 +76,10 @@ keyToRST :: WriterOptions
|
||||
-> State WriterState Doc
|
||||
keyToRST opts (label, (src, tit)) = do
|
||||
label' <- inlineListToRST opts label
|
||||
return $ text ".. _" <> label' <> text ": " <> text src
|
||||
let label'' = if ':' `elem` (render label')
|
||||
then char '`' <> label' <> char '`'
|
||||
else label'
|
||||
return $ text ".. _" <> label'' <> text ": " <> text src
|
||||
|
||||
-- | Return RST representation of notes.
|
||||
notesToRST :: WriterOptions -> [[Block]] -> State WriterState Doc
|
||||
|
||||
Reference in New Issue
Block a user