diff --git a/src/components/MarkdownViewer.vue b/src/components/MarkdownViewer.vue index ea499bc..0850a69 100644 --- a/src/components/MarkdownViewer.vue +++ b/src/components/MarkdownViewer.vue @@ -647,13 +647,13 @@ export default { const cells = row.querySelectorAll('th, td'); const rowData = Array.from(cells).map((cell) => { let text = cell.textContent.trim(); - // Escape quotes and wrap in quotes if contains comma - if (text.includes(',') || text.includes('"') || text.includes('\n')) { + // Escape quotes and wrap in quotes if contains semicolon, quotes or newlines + if (text.includes(';') || text.includes('"') || text.includes('\n')) { text = '"' + text.replace(/"/g, '""') + '"'; } return text; }); - csv += rowData.join(',') + '\n'; + csv += rowData.join(';') + '\n'; }); // Add UTF-8 BOM for proper character encoding