Add strikethrough support to markdown parser (~~text~~)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-07 00:10:38 -04:00
parent 50e6ee749e
commit 47c631ad4f
+3
View File
@@ -41,6 +41,9 @@ function parseMarkdown(markdown) {
html = html.replace(/\*(.+?)\*/g, '<em>$1</em>');
html = html.replace(/_(.+?)_/g, '<em>$1</em>');
// Strikethrough (~~text~~)
html = html.replace(/~~(.+?)~~/g, '<del>$1</del>');
// Images ![alt](url) - must come before link handler
html = html.replace(/!\[([^\]]*)\]\(([^)]+)\)/g, function(match, alt, url) {
if (/^https?:/i.test(url)) {