git.iko.soy/typeable/pandoc
on master help sign in
LaTeX reader: Fixed subtle bug in tokenizer.

Material following `^^` was dropped if it wasn't a character escape. This only affected invalid LaTeX, so we didn't see it in the wild, but it appeared in a QuickCheck test failure https://travis-ci.org/jgm/pandoc/jobs/319812224

commit685e90cd4f25e75d80b07b8fa9d3cd63f5999555 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 21 Dec 2017, 11:50 (9 years ago) parent117a672
1 file changed+3−2
src/Text/Pandoc/Readers/LaTeX.hs+3−2
src/Text/Pandoc/Readers/LaTeX.hs+3−2
@@ -376,8 +376,9 @@ totoks pos t =
376376 | d < '\128' ->
377377 Tok pos Esc1 (T.pack ['^','^',d])
378378 : totoks (incSourceColumn pos 3) rest''
379− _ -> [Tok pos Symbol ("^"),
380− Tok (incSourceColumn pos 1) Symbol ("^")]
379+ _ -> Tok pos Symbol ("^") :
380+ Tok (incSourceColumn pos 1) Symbol ("^") :
381+ totoks (incSourceColumn pos 2) rest'
381382 _ -> Tok pos Symbol ("^")
382383 : totoks (incSourceColumn pos 1) rest
383384 | otherwise ->