@@ -76,7 +76,10 @@ keyToRST :: WriterOptions
76 -> State WriterState Doc
76 -> State WriterState Doc
77keyToRST opts (label, (src, tit)) = do
77keyToRST opts (label, (src, tit)) = do
78 label' <- inlineListToRST opts label
78 label' <- inlineListToRST opts label
79+ let label'' = if ':' `elem` (render label')
80+ then char '`' <> label' <> char '`'
79− return $ text ".. _" <> label' <> text ": " <> text src
82+ return $ text ".. _" <> label'' <> text ": " <> text src
81-- | Return RST representation of notes.
84-- | Return RST representation of notes.
82notesToRST :: WriterOptions -> [[Block]] -> State WriterState Doc
85notesToRST :: WriterOptions -> [[Block]] -> State WriterState Doc