aboutsummaryrefslogtreecommitdiff
path: root/Text/Pandoc
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-01-06 19:46:55 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-01-06 19:46:55 +0000
commitb9e30ca8b7b8c5189ec2f6ad63301027070f6387 (patch)
tree84c80b6033f9a87e1cb4314f60763d6ec83a9d22 /Text/Pandoc
parent85657add6af502cac0d45f2f54c16ce4ea2abc60 (diff)
downloadpandoc-b9e30ca8b7b8c5189ec2f6ad63301027070f6387.tar.gz
RST reader: Fixed bug in parsing explicit links (resolves Issue #44).
The problem was that we were looking for inlines until a '<' character signaled the start of the URL. So if you hit a reference-style link, it would keep looking til the end of the document. Fix: change inline => (notFollowedBy (char '`') >> inline). Note that this won't allow code inlines in links, but these aren't allowed in resT anyway. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1175 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'Text/Pandoc')
-rw-r--r--Text/Pandoc/Readers/RST.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Text/Pandoc/Readers/RST.hs b/Text/Pandoc/Readers/RST.hs
index 67a4f6539..fb3129eac 100644
--- a/Text/Pandoc/Readers/RST.hs
+++ b/Text/Pandoc/Readers/RST.hs
@@ -570,8 +570,9 @@ link = choice [explicitLink, referenceLink, autoLink] <?> "link"
explicitLink = try $ do
char '`'
- notFollowedBy (char '`') -- `` is marks start of inline code
- label <- manyTill inline (try (spaces >> char '<'))
+ notFollowedBy (char '`') -- `` marks start of inline code
+ label <- manyTill (notFollowedBy (char '`') >> inline)
+ (try (spaces >> char '<'))
src <- manyTill (noneOf ">\n ") (char '>')
skipSpaces
string "`_"