GUIDE深度 · Deep dive
CSV to Markdown Pitfalls
CSV fields can contain commas, quotes and newlines; splitting on commas alone breaks columns. Markdown uses | for columns, so pipes inside fields must be escaped.
Order of operations
Parse quoted fields with CSV rules first.
Pad column counts, then escape pipes.
Finally emit the header and separator.
Checks
Confirm every row has the same column count.
Check for empty or duplicate headers.
Preview the rendered table for misalignment.
FAQ
Are number formats preserved?
Strings are preserved as-is; handle leading zeros and thousands separators yourself.
Is a header required?
Markdown requires a separator row; headers can be blank but are recommended.