diff options
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/RST.hs | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index a6b7cc19a..9610b75a5 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -677,7 +677,7 @@ sect = try (string "\\S") >> return (Str [chr 167]) escapedChar :: GenParser Char st Inline escapedChar = do result <- escaped (oneOf specialChars) - return $ if result == Str "\n" then Str " " else result + return $ if result == '\n' then Str " " else Str [result] emptyGroup :: GenParser Char st Inline emptyGroup = try $ do diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index 49ddb90fc..3dcfe47d0 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -750,7 +750,8 @@ hyphens = do return $ Str result escapedChar :: GenParser Char st Inline -escapedChar = escaped anyChar +escapedChar = do c <- escaped anyChar + return $ Str [c] symbol :: GenParser Char ParserState Inline symbol = do |