git.iko.soy/typeable/pandoc
on master help sign in
T.P.CSV: fix parsing of unquoted values.

Previously we didn't allow unescaped quotes in unquoted values, but they are allowed. Closes #7112.

commitf0a991a22be9b82e192d63bf80bbe39679bb2e07 authorJohn MacFarlane <jgm@berkeley.edu> dateMon 22 Feb 2021, 21:17 (6 years ago) parent00e4bb5
2 files changed+16−2
src/Text/Pandoc/CSV.hs+1−2 test/command/7112.md+15
src/Text/Pandoc/CSV.hs+1−2
@@ -68,8 +68,7 @@ escaped opts = try $
6868
6969pCSVUnquotedCell :: CSVOptions -> Parser Text
7070pCSVUnquotedCell opts = T.pack <$>
71− many (satisfy (\c -> c /= csvDelim opts && c /= '\r' && c /= '\n'
72− && c /= csvQuote opts))
71+ many (satisfy (\c -> c /= csvDelim opts && c /= '\r' && c /= '\n'))
7372
7473pCSVDelim :: CSVOptions -> Parser ()
7574pCSVDelim opts = do
test/command/7112.mdnew file+15
@@ -0,0 +1,15 @@
1+```
2+% pandoc -f rst
3+.. csv-table::
4+
5+ setting, ``echo PATH="path"``
6+^D
7+<table>
8+<tbody>
9+<tr class="odd">
10+<td>setting</td>
11+<td><code>echo PATH="path"</code></td>
12+</tr>
13+</tbody>
14+</table>
15+```