A simple JavaScript CSV to Markdown Table converter with Confluence Markup support
View the live demo to convert your CSV to a table on-the-fly.
Requires no external libraries. Works in Node.js as well as in browser.
Example Use:
csvToMarkdown( 'header1,header2,header3\nValue1,Value2,Value3', ',', true);
Outputs:
| header1 | header2 | header3 |
|---------|---------|---------|
| Value1 | Value2 | Value3 |
Which displays in Markdown as:
header1 | header2 | header3 |
---|---|---|
Value1 | Value2 | Value3 |
Example Use:
csvToMarkdown( 'header1,header2,header3\nValue1,Value2,Value3', ',', true, true);
Outputs:
|| header1 || header2 || header3 ||
| Value1 | Value2 | Value3 |
Which displays in JIRA/Confluence as:
header1 | header2 | header3 |
---|---|---|
Value1 | Value2 | Value3 |
Are you interested in contributing to this project? Please read CONTRIBUTING.md for information on how to contribute, developer installation, required testing steps and other information about best practices for this project.