aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Readers')
-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