Add Text.Pandoc.Readers.CSV (readCSV).

This adds csv as an input format.
The CSV table is converted into a pandoc simple table.

Closes #6100.
This commit is contained in:
John MacFarlane
2020-01-31 21:14:21 -08:00
parent cef30e7384
commit f9514ccb9e
6 changed files with 134 additions and 2 deletions
+17
View File
@@ -0,0 +1,17 @@
```
% pandoc -f csv -t native
Fruit,Price,Quantity
Apple,25 cents,33
"""Navel"" Orange","35 cents",22
^D
[Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0]
[[Plain [Str "Fruit"]]
,[Plain [Str "Price"]]
,[Plain [Str "Quantity"]]]
[[[Plain [Str "Apple"]]
,[Plain [Str "25",Space,Str "cents"]]
,[Plain [Str "33"]]]
,[[Plain [Str "\"Navel\"",Space,Str "Orange"]]
,[Plain [Str "35",Space,Str "cents"]]
,[Plain [Str "22"]]]]]
```