diff --git a/package-lock.json b/package-lock.json index b17069c..ae5659f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,6 @@ "@popperjs/core": "2.11.x", "@tailwindcss/forms": "0.5.x", "@tailwindcss/typography": "0.5.x", - "@types/highlight.js": "^9.12.4", "asciidoctor": "3.0.x", "d3": "^7.9.0", "he": "1.2.x", @@ -1547,12 +1546,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/highlight.js": { - "version": "9.12.4", - "resolved": "https://registry.npmjs.org/@types/highlight.js/-/highlight.js-9.12.4.tgz", - "integrity": "sha512-t2szdkwmg2JJyuCM20e8kR2X59WCE5Zkl4bzm1u1Oukjm79zpbiAv+QjnwLnuuV0WHEcX2NgUItu0pAMKuOPww==", - "license": "MIT" - }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", diff --git a/package.json b/package.json index 96db5de..01c7b4d 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,6 @@ "@popperjs/core": "2.11.x", "@tailwindcss/forms": "0.5.x", "@tailwindcss/typography": "0.5.x", - "@types/highlight.js": "^11.11.1", "asciidoctor": "3.0.x", "d3": "^7.9.0", "he": "1.2.x", diff --git a/src/lib/utils/markdownParser.ts b/src/lib/utils/markdownParser.ts deleted file mode 100644 index a257599..0000000 --- a/src/lib/utils/markdownParser.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Process inline code - */ -function processInlineCode(text: string): string { - return text.replace(INLINE_CODE_REGEX, (match, code) => { - return `${code}`; - }); -} - -// Regular expressions for markdown elements -const BOLD_REGEX = /\*\*([^*]+)\*\*|\*([^*]+)\*/g; -const ITALIC_REGEX = /_([^_]+)_/g; -const HEADING_REGEX = /^(#{1,6})\s+(.+)$/gm; -const ALTERNATE_HEADING_REGEX = /^(.+)\n([=]{3,}|-{3,})$/gm; -const HORIZONTAL_RULE_REGEX = /^(?:---|\*\*\*|___)$/gm; -const INLINE_CODE_REGEX = /`([^`\n]+)`/g; -const LINK_REGEX = /\[([^\]]+)\]\(([^)]+)\)/g; -const IMAGE_REGEX = /!\[([^\]]*)\]\(([^)]+)\)/g; -const HASHTAG_REGEX = /(?