one general case in dealing with backslash in latex lexing is enough

This commit is contained in:
aarne
2014-10-17 15:49:23 +00:00
parent 53787205b9
commit 1550300c80

View File

@@ -59,7 +59,6 @@ unlexCode s = case s of
lexLatexCode :: String -> [String]
lexLatexCode = restoreBackslash . lexCode where --- quick hack: postprocess Haskell's lex
restoreBackslash ws = case ws of
"\\":"\\":ww -> "\\\\":restoreBackslash ww
"\\":w:ww -> ("\\" ++ w) : restoreBackslash ww
w:ww -> w:restoreBackslash ww
_ -> ws