forked from GitHub/gf-core
one general case in dealing with backslash in latex lexing is enough
This commit is contained in:
@@ -59,7 +59,6 @@ unlexCode s = case s of
|
|||||||
lexLatexCode :: String -> [String]
|
lexLatexCode :: String -> [String]
|
||||||
lexLatexCode = restoreBackslash . lexCode where --- quick hack: postprocess Haskell's lex
|
lexLatexCode = restoreBackslash . lexCode where --- quick hack: postprocess Haskell's lex
|
||||||
restoreBackslash ws = case ws of
|
restoreBackslash ws = case ws of
|
||||||
"\\":"\\":ww -> "\\\\":restoreBackslash ww
|
|
||||||
"\\":w:ww -> ("\\" ++ w) : restoreBackslash ww
|
"\\":w:ww -> ("\\" ++ w) : restoreBackslash ww
|
||||||
w:ww -> w:restoreBackslash ww
|
w:ww -> w:restoreBackslash ww
|
||||||
_ -> ws
|
_ -> ws
|
||||||
|
|||||||
Reference in New Issue
Block a user