Skip to content

Commit

Permalink
Revert "[#63734] support mermaid diagrams"
Browse files Browse the repository at this point in the history
This reverts commit e9f23c6.
  • Loading branch information
MaciejWas committed Aug 8, 2024
1 parent 9782eda commit 0d0a742
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 450 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"test": "PW_TEST_HTML_REPORT_OPEN=never playwright test -c tests/playwright.config.js --reporter html"
},
"dependencies": {
"@agoose77/markdown-it-mermaid": "^1.1.0",
"@codemirror/commands": "^6.2.4",
"@codemirror/lang-markdown": "^6.2.3",
"@codemirror/merge": "@6.0.0",
Expand Down
8 changes: 1 addition & 7 deletions src/hooks/useText.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import markdownIt from "markdown-it";
import { markdownReplacer, useCustomRoles } from "./markdownReplacer";
import { useCallback, useEffect, useMemo, useReducer, useState } from "preact/hooks";
import IMurMurHash from "imurmurhash";
import markdownItMermaid from "@agoose77/markdown-it-mermaid";

const countOccurences = (str, pattern) => (str?.match(pattern) || []).length;

Expand Down Expand Up @@ -63,12 +62,7 @@ export const useText = ({ initialText, transforms, customRoles, preview }) => {
}, []);

const markdown = useMemo(
() =>
markdownIt({ breaks: true, linkify: true })
.use(markdownitDocutils)
.use(markdownReplacer(transforms))
.use(useCustomRoles(customRoles))
.use(markdownItMermaid),
() => markdownIt({ breaks: true, linkify: true }).use(markdownitDocutils).use(markdownReplacer(transforms)).use(useCustomRoles(customRoles)),
[],
);

Expand Down
Loading

0 comments on commit 0d0a742

Please sign in to comment.