FSharp.Data
FSharp.Data copied to clipboard
CSV changes to enable Markdown Table Parsing
I had a thought the other day (OK a while ago), that it would be nice to work with a Markdown Table as if it was CSV Data.
| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
The Pipe |
separator doesn't really work, there's a couple of things that get in the way.
Instead of adding just a "Markdown Mode" here are 2 suggestions that enable you to parse Markdown Tables with the CSV Provider.
-
Ignore Line Pattern- a Regex pattern that if met means a line of the CSV file is ignored. This could be used to stop it looking at the line between the headers and the content.
-
Trim Column Value (yes/no) This would call
String.Trim
on the call value before returning it. It also helps in the type inference get the correct types.
I've started work on this, and am just merging with the latest and polishing it off before I think about submitting a PR, does anyone see any value in this?