aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-01-23 00:25:05 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2011-01-23 00:25:05 -0800
commit1d683be4146678c5d674ecd9ea365943c385774c (patch)
treee19b78bebce8dda2f14172d3d23dbd01f5ae8be5 /src/Text/Pandoc
parent50d08ec2c3892076bde53b66f1b728e4bf23ab97 (diff)
downloadpandoc-1d683be4146678c5d674ecd9ea365943c385774c.tar.gz
Textile reader: Support <tt> for inline code.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Textile.hs14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs
index 05bcd6108..f9007d77c 100644
--- a/src/Text/Pandoc/Readers/Textile.hs
+++ b/src/Text/Pandoc/Readers/Textile.hs
@@ -368,9 +368,9 @@ inlineParsers = [ autoLink
, str
, whitespace
, endline
+ , code
, htmlSpan
, rawHtmlInline
- , code
, note
, simpleInline (string "??") (Cite [])
, simpleInline (string "**") Strong
@@ -490,8 +490,16 @@ symbol = do
-- | Inline code
code :: GenParser Char ParserState Inline
-code = surrounded (char '@') anyChar >>=
- return . Code
+code = code1 <|> code2
+
+code1 :: GenParser Char ParserState Inline
+code1 = surrounded (char '@') anyChar >>= return . Code
+
+code2 :: GenParser Char ParserState Inline
+code2 = do
+ htmlTag (tagOpen (=="tt") null)
+ result' <- manyTill anyChar (try $ htmlTag $ tagClose (=="tt"))
+ return $ Code result'
-- | Html / CSS attributes
attributes :: GenParser Char ParserState String