diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-02-14 06:57:23 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-02-14 06:57:23 +0000 |
commit | 7f65a4e9149b1c8bbf5df42812782cbfabb0756b (patch) | |
tree | 5da1e33f2e7624bd3f03b8284bcecfa5ba886e86 /src/Text/Pandoc | |
parent | 6e467c26c498328ca9c151295c850939e0660e6b (diff) | |
download | pandoc-7f65a4e9149b1c8bbf5df42812782cbfabb0756b.tar.gz |
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
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/RST.hs | 2 |
1 files changed, 2 insertions, 0 deletions
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 |