LaTeX reader: Control sequences can't be followed by a letter.

This fixes a bug where `\begingroup` was parsed as `\begin`
followed by `group`.
This commit is contained in:
John MacFarlane 2012-04-10 18:25:18 -07:00
parent 66f8dc14b7
commit 54c9d4348a

View file

@ -82,7 +82,7 @@ controlSeq name = try $ do
case name of
"" -> mzero
[c] | not (isLetter c) -> string [c]
cs -> string cs <* optional sp
cs -> string cs <* notFollowedBy letter <* optional sp
return name
sp :: LP ()