T.P.CSV: fix parsing of unquoted values.

Previously we didn't allow unescaped quotes in unquoted values,
but they are allowed. Closes #7112.
This commit is contained in:
John MacFarlane 2021-02-22 21:17:22 -08:00
parent 00e4bb51e4
commit f0a991a22b
2 changed files with 16 additions and 2 deletions

View file

@ -68,8 +68,7 @@ escaped opts = try $
pCSVUnquotedCell :: CSVOptions -> Parser Text
pCSVUnquotedCell opts = T.pack <$>
many (satisfy (\c -> c /= csvDelim opts && c /= '\r' && c /= '\n'
&& c /= csvQuote opts))
many (satisfy (\c -> c /= csvDelim opts && c /= '\r' && c /= '\n'))
pCSVDelim :: CSVOptions -> Parser ()
pCSVDelim opts = do

15
test/command/7112.md Normal file
View file

@ -0,0 +1,15 @@
```
% pandoc -f rst
.. csv-table::
setting, ``echo PATH="path"``
^D
<table>
<tbody>
<tr class="odd">
<td>setting</td>
<td><code>echo PATH="path"</code></td>
</tr>
</tbody>
</table>
```