diff --git a/client/components/codeEditor/codeEditor.less b/client/components/codeEditor/codeEditor.less index 84ed8058d..4ca374291 100644 --- a/client/components/codeEditor/codeEditor.less +++ b/client/components/codeEditor/codeEditor.less @@ -100,6 +100,10 @@ vertical-align : sub; color : rgb(123, 123, 15); } + .cm-strikethrough { + text-decoration: line-through; + } + .cm-definitionList { .cm-definitionTerm { color : rgb(96, 117, 143); } .cm-definitionColon:not(:has(.cm-comment)) { diff --git a/client/components/codeEditor/customHighlight.js b/client/components/codeEditor/customHighlight.js index 0d53e2f33..09a9af18f 100644 --- a/client/components/codeEditor/customHighlight.js +++ b/client/components/codeEditor/customHighlight.js @@ -16,6 +16,7 @@ const customTags = { definitionTerm : 'definitionTerm', // .cm-definitionTerm definitionDesc : 'definitionDesc', // .cm-definitionDesc definitionColon : 'definitionColon', // .cm-definitionColon + strikethrough : 'strikethrough', // .cm-strikethrough //CSS @@ -81,6 +82,23 @@ export function tokenizeCustomMarkdown(text) { } } + // --- Strikethrough --- + if(/\~/.test(lineText)) { + const strikethroughRegex = /~(?!\s)(.+?)(?