git.iko.soy/typeable/pandoc
on master help sign in
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

commit7f65a4e9149b1c8bbf5df42812782cbfabb0756b authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateWed 14 Feb 2007, 06:57 (20 years ago) parent6e467c2
1 file changed+2
src/Text/Pandoc/Readers/RST.hs+2
src/Text/Pandoc/Readers/RST.hs+2
@@ -603,6 +603,7 @@ link = choice [explicitLink, referenceLink, autoLink,
603603
604604explicitLink = try (do
605605 char '`'
606+ notFollowedBy (char '`') -- `` is marks start of inline code
606607 label <- manyTill inline (try (do {spaces; char '<'}))
607608 src <- manyTill (noneOf ">\n ") (char '>')
608609 skipSpaces
@@ -625,6 +626,7 @@ anonymousLinkEnding = try (do
625626
626627referenceLink = try (do
627628 char '`'
629+ notFollowedBy (char '`')
628630 label <- manyTill inline (char '`')
629631 char '_'
630632 src <- option (Ref []) anonymousLinkEnding