aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/RST.hs3
1 files changed, 2 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 ':'