diff options
-rw-r--r-- | src/Text/Pandoc/Readers/RST.hs | 3 | ||||
-rw-r--r-- | test/command/7568.md | 11 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index ff891d3c6..458a2d48b 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -1155,10 +1155,11 @@ referenceNames = do let rn = try $ do string ".. _" ref <- quotedReferenceName - <|> manyChar ( noneOf ":\n" + <|> manyChar ( noneOf "\\:\n" <|> try (char '\n' <* string " " <* notFollowedBy blankline) + <|> try (char '\\' *> char ':') <|> try (char ':' <* lookAhead alphaNum) ) char ':' diff --git a/test/command/7568.md b/test/command/7568.md new file mode 100644 index 000000000..42f1e37b1 --- /dev/null +++ b/test/command/7568.md @@ -0,0 +1,11 @@ +``` +% pandoc -f rst +While `Labyrinth Lord: Revised Edition`_ (LLRE; PDF and POD) has been +criticized for not being a completely faithful retro-clone of the +Moldvay/Cook/Marsh Basic/Expert D&D rules (B/X), I think it still +holds a useful spot. + +.. _Labyrinth Lord\: Revised Edition: https://www.drivethrurpg.com/product/64332/Labyrinth-Lord-Revised-Edition +^D +<p>While <a href="https://www.drivethrurpg.com/product/64332/Labyrinth-Lord-Revised-Edition">Labyrinth Lord: Revised Edition</a> (LLRE; PDF and POD) has been criticized for not being a completely faithful retro-clone of the Moldvay/Cook/Marsh Basic/Expert D&D rules (B/X), I think it still holds a useful spot.</p> +``` |