aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index ed447e9c6..eedf0311d 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -617,6 +617,11 @@ table = failIfStrict >> (simpleTable <|> multilineTable) <?> "table"
inline = choice [ rawLaTeXInline'
, escapedChar
+ , smartPunctuation
+ , linebreak
+ , endline
+ , whitespace
+ , str
, charRef
, note
, inlineNote
@@ -631,15 +636,9 @@ inline = choice [ rawLaTeXInline'
, strikeout
, superscript
, subscript
- , smartPunctuation
, code
- , ltSign
, symbol
- , str
- , linebreak
- , tabchar
- , whitespace
- , endline ] <?> "inline"
+ , ltSign ] <?> "inline"
escapedChar = try $ do
char '\\'
@@ -649,10 +648,11 @@ escapedChar = try $ do
else satisfy (not . isAlphaNum)
return $ Str [result]
-ltSign = try $ do
- notFollowedBy (noneOf "<") -- continue only if it's a <
- notFollowedBy' rawHtmlBlocks -- don't return < if it starts html
- char '<'
+ltSign = do
+ st <- getState
+ if stateStrict st
+ then char '<'
+ else notFollowedBy' rawHtmlBlocks >> char '<' -- unless it starts html
return $ Str ['<']
specialCharsMinusLt = filter (/= '<') specialChars
@@ -760,8 +760,6 @@ emDash = try $ skipSpaces >> oneOfStrings ["---", "--"] >>
whitespace = (many1 (oneOf spaceChars) >> return Space) <?> "whitespace"
-tabchar = tab >> return (Str "\t")
-
-- hard line break
linebreak = try $ oneOf spaceChars >> many1 (oneOf spaceChars) >>
endline >> return LineBreak