From a84a9ce08af0c023b1cbeac3cc68f3397ec9bf9b Mon Sep 17 00:00:00 2001 From: Baku Hashimoto Date: Sat, 30 Sep 2023 02:40:19 +0900 Subject: [PATCH] Add Markdown --- dev_modules/linearly | 2 +- package.json | 6 + src/components/App.vue | 2 +- src/tweeq/Markdown/Markdown.vue | 92 ++ .../Markdown/MarkdownItMonacoHighlight.ts | 33 + src/tweeq/Markdown/index.ts | 3 + src/tweeq/Markdown/katex.css | 1137 +++++++++++++++++ src/tweeq/index.ts | 10 +- yarn.lock | 72 ++ 9 files changed, 1351 insertions(+), 6 deletions(-) create mode 100644 src/tweeq/Markdown/Markdown.vue create mode 100644 src/tweeq/Markdown/MarkdownItMonacoHighlight.ts create mode 100644 src/tweeq/Markdown/index.ts create mode 100644 src/tweeq/Markdown/katex.css diff --git a/dev_modules/linearly b/dev_modules/linearly index e0c1aa8..47d18a0 160000 --- a/dev_modules/linearly +++ b/dev_modules/linearly @@ -1 +1 @@ -Subproject commit e0c1aa8aa8ebd9ff3f7e4238483814841957c9a6 +Subproject commit 47d18a048797c8b62813abe07c364bd1a976ebad diff --git a/package.json b/package.json index b2136fd..8b0d376 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ }, "devDependencies": { "@material/material-color-utilities": "^0.2.7", + "@traptitech/markdown-it-katex": "^3.6.0", "@types/wicg-file-system-access": "^2020.9.6", "@typescript-eslint/eslint-plugin": "^6.7.0", "@typescript-eslint/parser": "^6.7.0", @@ -29,6 +30,11 @@ "eslint-plugin-unused-imports": "^3.0.0", "eslint-plugin-vue": "^9.17.0", "fast-fuzzy": "^1.12.0", + "markdown-it": "^13.0.2", + "markdown-it-anchor": "^8.6.7", + "markdown-it-deflist": "^2.1.0", + "markdown-it-footnote": "^3.0.3", + "markdown-it-toc-done-right": "^4.2.0", "monaco-editor": "^0.43.0", "monaco-themes": "^0.4.4", "paper": "^0.12.17", diff --git a/src/components/App.vue b/src/components/App.vue index 37ccf9b..ec101b1 100644 --- a/src/components/App.vue +++ b/src/components/App.vue @@ -338,7 +338,7 @@ window.addEventListener('drop', async e => {