diff options
author | John MacFarlane <jgm@berkeley.edu> | 2010-12-30 14:33:11 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2010-12-30 14:33:11 -0800 |
commit | f49e60a8b87ef28bcaeeeae00f6e330c6155851b (patch) | |
tree | 96e71513931d89a2a41012c6abab8cb900c951cc /src/Text/Pandoc/Readers | |
parent | 904050fa36715e18522d80432a2666fcbaacd105 (diff) | |
download | pandoc-f49e60a8b87ef28bcaeeeae00f6e330c6155851b.tar.gz |
Textile reader: Slight speed improvement.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/Textile.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs index 8362c542c..c3b2e69a2 100644 --- a/src/Text/Pandoc/Readers/Textile.hs +++ b/src/Text/Pandoc/Readers/Textile.hs @@ -356,14 +356,13 @@ inlines = manyTill inline newline -- | Inline parsers tried in order inlineParsers :: [GenParser Char ParserState Inline] inlineParsers = [ autoLink - , mark - , note , str - , htmlSpan , whitespace , endline + , htmlSpan , rawHtmlInline , code + , note , simpleInline (string "??") (Cite []) , simpleInline (string "**") Strong , simpleInline (string "__") Emph @@ -374,6 +373,7 @@ inlineParsers = [ autoLink , simpleInline (char '~') Subscript , link , image + , mark , smartPunctuation inline , symbol ] @@ -450,14 +450,14 @@ endline = try $ do rawHtmlInline :: GenParser Char ParserState Inline rawHtmlInline = liftM (HtmlInline . snd) $ htmlTag isInlineTag --- | Textile standard link syntax is label:"target" +-- | Textile standard link syntax is "label":target link :: GenParser Char ParserState Inline link = try $ do name <- surrounded (char '"') inline char ':' url <- manyTill (anyChar) (lookAhead $ (space <|> try (oneOf ".;," >> (space <|> newline)))) return $ Link name (url, "") - + -- | Detect plain links to http or email. autoLink :: GenParser Char ParserState Inline autoLink = do |