A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
editor: do not use look behind regex (#7809)
Ammar Ahmed2078ef90813e
diff --git a/packages/editor/src/extensions/clipboard/clipboard-text-parser.ts b/packages/editor/src/extensions/clipboard/clipboard-text-parser.tsindex 041f421be..f0dd1c5af 100644--- a/packages/editor/src/extensions/clipboard/clipboard-text-parser.ts+++ b/packages/editor/src/extensions/clipboard/clipboard-text-parser.ts@@ -108,10 +108,10 @@ const MARKDOWN_PATTERNS: MarkdownPattern[] = [{ pattern: /\[:(.+?)\]/, score: 2, type: "footnote" },// Weak indicators- { pattern: /(?<!\*)\*\*[^*\n]+\*\*(?!\*)/m, score: 1, type: "bold" },- { pattern: /(?<!\*)\*[^*\n]+\*(?!\*)/m, score: 1, type: "italic" },- { pattern: /(?<!_)__[^_\n]+__(?!_)/m, score: 1, type: "boldUnderscore" },- { pattern: /(?<!_)_[^_\n]+_(?!_)/m, score: 1, type: "italicUnderscore" },+ { pattern: /(^|[^*])\*\*([^*\n]+)\*\*(?!\*)/m, score: 1, type: "bold" },+ { pattern: /(^|[^*])\*([^*\n]+)\*(?!\*)/m, score: 1, type: "italic" },+ { pattern: /(^|[^_])__([^_\n]+)__(?!_)/m, score: 1, type: "boldUnderscore" },+ { pattern: /(^|[^_])_([^_\n]+)_(?!_)/m, score: 1, type: "italicUnderscore" },{ pattern: /`[^`\n]+`/m, score: 1, type: "inlineCode" },{ pattern: /~~[^~\n]+~~/m, score: 1, type: "strikethrough" },