git.iko.soy/typeable/pandoc
on master help sign in
Textile reader: Slight speed improvement.
commitf49e60a8b87ef28bcaeeeae00f6e330c6155851b authorJohn MacFarlane <jgm@berkeley.edu> dateThu 30 Dec 2010, 14:33 (16 years ago) parent904050f
1 file changed+5−5
src/Text/Pandoc/Readers/Textile.hs+5−5
src/Text/Pandoc/Readers/Textile.hs+5−5
@@ -356,14 +356,13 @@ inlines = manyTill inline newline
356356-- | Inline parsers tried in order
357357inlineParsers :: [GenParser Char ParserState Inline]
358358inlineParsers = [ autoLink
359− , mark
360− , note
361359 , str
362− , htmlSpan
363360 , whitespace
364361 , endline
362+ , htmlSpan
365363 , rawHtmlInline
366364 , code
365+ , note
367366 , simpleInline (string "??") (Cite [])
368367 , simpleInline (string "**") Strong
369368 , simpleInline (string "__") Emph
@@ -374,6 +373,7 @@ inlineParsers = [ autoLink
374373 , simpleInline (char '~') Subscript
375374 , link
376375 , image
376+ , mark
377377 , smartPunctuation inline
378378 , symbol
379379 ]
@@ -450,14 +450,14 @@ endline = try $ do
450450rawHtmlInline :: GenParser Char ParserState Inline
451451rawHtmlInline = liftM (HtmlInline . snd) $ htmlTag isInlineTag
452452
453−-- | Textile standard link syntax is label:"target"
453+-- | Textile standard link syntax is "label":target
454454link :: GenParser Char ParserState Inline
455455link = try $ do
456456 name <- surrounded (char '"') inline
457457 char ':'
458458 url <- manyTill (anyChar) (lookAhead $ (space <|> try (oneOf ".;," >> (space <|> newline))))
459459 return $ Link name (url, "")
460−
460+
461461-- | Detect plain links to http or email.
462462autoLink :: GenParser Char ParserState Inline
463463autoLink = do