git.iko.soy/typeable/pandoc
on master help sign in
LaTeX reader: be more tolerant of `&` character.

This allows us to parse unknown tabular environments as raw LaTeX. Closes #4208.

commit3c93ac5cf0995cc2dd8bb5775029da550af61e0d authorJohn MacFarlane <jgm@berkeley.edu> dateThu 28 Dec 2017, 08:38 (9 years ago) parent2278cd5
2 files changed+19−1
src/Text/Pandoc/Readers/LaTeX.hs+1−1 test/command/4208.md+18
src/Text/Pandoc/Readers/LaTeX.hs+1−1
@@ -1726,7 +1726,7 @@ inline = (mempty <$ comment)
17261726 <|> (guardEnabled Ext_literate_haskell *> symbol '|' *> doLHSverb)
17271727 <|> (str . (:[]) <$> primEscape)
17281728 <|> regularSymbol
1729− <|> (do res <- symbolIn "#^'`\"[]"
1729+ <|> (do res <- symbolIn "#^'`\"[]&"
17301730 pos <- getPosition
17311731 let s = T.unpack (untoken res)
17321732 report $ ParsingUnescaped s pos
test/command/4208.mdnew file+18
@@ -0,0 +1,18 @@
1+```
2+% pandoc -t latex
3+What is a _piffle_? Mark the correct answer(s):
4+
5+\begin{TAB}(@)[6pt]{|l|c|}{|c|c|c|}
6+(a) a subnormal woffle & $\Box$ \\
7+(b) an infinite-dimensional baffle & $\Box$ \\
8+(c) an inverted first-order triffle & $\Box$ \\
9+\end{TAB}
10+^D
11+What is a \emph{piffle}? Mark the correct answer(s):
12+
13+\begin{TAB}(@)[6pt]{|l|c|}{|c|c|c|}
14+(a) a subnormal woffle & $\Box$ \\
15+(b) an infinite-dimensional baffle & $\Box$ \\
16+(c) an inverted first-order triffle & $\Box$ \\
17+\end{TAB}
18+```