From 7f65a4e9149b1c8bbf5df42812782cbfabb0756b Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Wed, 14 Feb 2007 06:57:23 +0000 Subject: 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 --- src/Text/Pandoc/Readers/RST.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index 2391fa497..29518fbe1 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -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 -- cgit v1.2.3