diff options
Diffstat (limited to 'Text/Pandoc/Readers')
-rw-r--r-- | Text/Pandoc/Readers/TeXMath.hs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Text/Pandoc/Readers/TeXMath.hs b/Text/Pandoc/Readers/TeXMath.hs index 918bb0670..347fde42d 100644 --- a/Text/Pandoc/Readers/TeXMath.hs +++ b/Text/Pandoc/Readers/TeXMath.hs @@ -45,7 +45,7 @@ readTeXMath inp = case parse teXMath "input" inp of teXMath = manyTill mathPart eof >>= return . concat mathPart = whitespace <|> superscript <|> subscript <|> symbol <|> - argument <|> plain <|> misc + argument <|> digits <|> letters <|> misc whitespace = many1 space >> return [] @@ -64,9 +64,13 @@ argument = try $ do then [Str " "] else [Str "{"] ++ concat res ++ [Str "}"] -plain = do - res <- many1 alphaNum - return $ [Emph [Str res]] +digits = do + res <- many1 digit + return [Str res] + +letters = do + res <- many1 letter + return [Emph [Str res]] misc = do res <- noneOf "{}\\" |