1
0
forked from GitHub/gf-core

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 3f11f3d602
commit 5c862a3c7b

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