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:
fiddlosopher
2007-02-14 06:57:23 +00:00
parent 6e467c26c4
commit 7f65a4e914
+2
View File
@@ -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