feat(import/markdown): preserve column widths

This commit is contained in:
Elian Doran
2025-04-05 21:13:12 +03:00
parent b6c185fd32
commit ab416e02b4
3 changed files with 10 additions and 1 deletions

View File

@@ -100,7 +100,7 @@ function renderToHtml(content: string, title: string) {
html = htmlSanitizer.sanitize(html);
// Add a trailing semicolon to CSS styles.
html = html.replaceAll(/(<(img|figure).*?style=".*?)"/g, "$1;\"");
html = html.replaceAll(/(<(img|figure|col).*?style=".*?)"/g, "$1;\"");
// Remove slash for self-closing tags to match CKEditor's approach.
html = html.replace(/<(\w+)([^>]*)\s+\/>/g, "<$1$2>");