LaTeX reader: be more forgiving of non-standard characters.

E.g. `^` outside of math.  Some custom environments give
these a meaning, so we should try not to fall over when we
encounter them.
This commit is contained in:
John MacFarlane 2016-07-20 11:36:50 -07:00
parent 1b6c9733ee
commit 34533dd8d1

View file

@ -232,7 +232,7 @@ inline = (mempty <$ comment)
<|> (guardEnabled Ext_literate_haskell *> char '|' *> doLHSverb)
<|> (str . (:[]) <$> tildeEscape)
<|> (str . (:[]) <$> oneOf "[]")
<|> (str . (:[]) <$> oneOf "#&") -- TODO print warning?
<|> (str . (:[]) <$> oneOf "#&~^'`\"[]") -- TODO print warning?
-- <|> (str <$> count 1 (satisfy (\c -> c /= '\\' && c /='\n' && c /='}' && c /='{'))) -- eat random leftover characters
inlines :: LP Inlines