mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-25 01:36:45 +00:00
Fixed issue #8: slow performance in parsing inline literals in
RST reader. The problem was that ``#`` was seen by 'inline' as a potential link or image. Fix: insert 'notFollowedBy (char '`')' in link parsers. git-svn-id: https://pandoc.googlecode.com/svn/trunk@529 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
@@ -603,6 +603,7 @@ link = choice [explicitLink, referenceLink, autoLink,
|
||||
|
||||
explicitLink = try (do
|
||||
char '`'
|
||||
notFollowedBy (char '`') -- `` is marks start of inline code
|
||||
label <- manyTill inline (try (do {spaces; char '<'}))
|
||||
src <- manyTill (noneOf ">\n ") (char '>')
|
||||
skipSpaces
|
||||
@@ -625,6 +626,7 @@ anonymousLinkEnding = try (do
|
||||
|
||||
referenceLink = try (do
|
||||
char '`'
|
||||
notFollowedBy (char '`')
|
||||
label <- manyTill inline (char '`')
|
||||
char '_'
|
||||
src <- option (Ref []) anonymousLinkEnding
|
||||
|
||||
Reference in New Issue
Block a user