summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Textile.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2010-12-30 14:33:11 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2010-12-30 14:33:11 -0800
commitf49e60a8b87ef28bcaeeeae00f6e330c6155851b (patch)
tree96e71513931d89a2a41012c6abab8cb900c951cc /src/Text/Pandoc/Readers/Textile.hs
parent904050fa36715e18522d80432a2666fcbaacd105 (diff)
Textile reader: Slight speed improvement.
Diffstat (limited to 'src/Text/Pandoc/Readers/Textile.hs')
-rw-r--r--src/Text/Pandoc/Readers/Textile.hs10
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