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
This commit is contained in:
parent
85657add6a
commit
b9e30ca8b7
1 changed files with 3 additions and 2 deletions
|
@ -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 "`_"
|
||||
|
|
Loading…
Add table
Reference in a new issue