From bf4e59bc4640b3533790a5b8c623f33a586ae729 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 25 Feb 2012 09:55:38 -0800 Subject: LaTeX reader: correctly handle \^{}. --- src/Text/Pandoc/Readers/LaTeX.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 59e68262e..78a29a3f5 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -370,14 +370,14 @@ inlineCommands = M.fromList $ , ("pounds", lit "£") , ("euro", lit "€") , ("copyright", lit "©") - , ("`", tok >>= accent grave) - , ("'", tok >>= accent acute) - , ("^", tok >>= accent circ) - , ("~", tok >>= accent tilde) - , ("\"", tok >>= accent umlaut) - , (".", tok >>= accent dot) - , ("=", tok >>= accent macron) - , ("c", tok >>= accent cedilla) + , ("`", option (str "`") $ try $ tok >>= accent grave) + , ("'", option (str "'") $ try $ tok >>= accent acute) + , ("^", option (str "^") $ try $ tok >>= accent circ) + , ("~", option (str "~") $ try $ tok >>= accent tilde) + , ("\"", option (str "\"") $ try $ tok >>= accent umlaut) + , (".", option (str ".") $ try $ tok >>= accent dot) + , ("=", option (str "=") $ try $ tok >>= accent macron) + , ("c", option (str "c") $ try $ tok >>= accent cedilla) , ("i", lit "i") , ("\\", linebreak <$ (optional (bracketed inline) *> optional sp)) , (",", pure mempty) -- cgit v1.2.3