diff --git a/web/src/labs/marked/parser/Blockquote.tsx b/web/src/labs/marked/parser/Blockquote.tsx index da4d02c7..5d1daf48 100644 --- a/web/src/labs/marked/parser/Blockquote.tsx +++ b/web/src/labs/marked/parser/Blockquote.tsx @@ -1,4 +1,3 @@ -import { escape } from "lodash"; import { matcher } from "../matcher"; export const BLOCKQUOTE_REG = /^> ([^\n]+)/; @@ -9,7 +8,7 @@ const renderer = (rawStr: string) => { return <>{rawStr}>; } - return
{escape(matchResult[1])}; + return
{matchResult[1]}; }; export default { diff --git a/web/src/labs/marked/parser/CodeBlock.tsx b/web/src/labs/marked/parser/CodeBlock.tsx index e3c4be45..231033ca 100644 --- a/web/src/labs/marked/parser/CodeBlock.tsx +++ b/web/src/labs/marked/parser/CodeBlock.tsx @@ -1,5 +1,4 @@ import copy from "copy-to-clipboard"; -import { escape } from "lodash-es"; import hljs from "highlight.js"; import { useTranslation } from "react-i18next"; import { matcher } from "../matcher"; @@ -14,7 +13,7 @@ const renderer = (rawStr: string) => { return <>{rawStr}>; } - const language = escape(matchResult[1]) || "plaintext"; + const language = matchResult[1] || "plaintext"; let highlightedCode = hljs.highlightAuto(matchResult[2]).value; try { diff --git a/web/src/labs/marked/parser/Heading.tsx b/web/src/labs/marked/parser/Heading.tsx index 82308e4b..aadfa408 100644 --- a/web/src/labs/marked/parser/Heading.tsx +++ b/web/src/labs/marked/parser/Heading.tsx @@ -1,4 +1,3 @@ -import { escape } from "lodash"; import { matcher } from "../matcher"; export const HEADING_REG = /^(#+) ([^\n]+)/; @@ -11,15 +10,15 @@ const renderer = (rawStr: string) => { const level = matchResult[1].length; if (level === 1) { - return
{escape(matchResult[1])}
;
+ return {matchResult[1]}
;
};
export default {
diff --git a/web/src/labs/marked/parser/Link.tsx b/web/src/labs/marked/parser/Link.tsx
index 3ff7ada0..b7ea90b0 100644
--- a/web/src/labs/marked/parser/Link.tsx
+++ b/web/src/labs/marked/parser/Link.tsx
@@ -1,4 +1,3 @@
-import { escape } from "lodash-es";
import Emphasis from "./Emphasis";
import Bold from "./Bold";
import { marked } from "..";
@@ -16,7 +15,7 @@ const renderer = (rawStr: string) => {
}
const parsedContent = marked(matchResult[1], [], [InlineCode, BoldEmphasis, Emphasis, Bold, PlainText]);
return (
-
+
{parsedContent}
);
diff --git a/web/src/labs/marked/parser/PlainLink.tsx b/web/src/labs/marked/parser/PlainLink.tsx
index f420fbe4..c754ee7d 100644
--- a/web/src/labs/marked/parser/PlainLink.tsx
+++ b/web/src/labs/marked/parser/PlainLink.tsx
@@ -1,4 +1,3 @@
-import { escape } from "lodash-es";
import { matcher } from "../matcher";
export const PLAIN_LINK_REG = /(https?:\/\/[^ ]+)/;
@@ -10,8 +9,8 @@ const renderer = (rawStr: string) => {
}
return (
-
- {escape(matchResult[1])}
+
+ {matchResult[1]}
);
};
diff --git a/web/src/labs/marked/parser/PlainText.tsx b/web/src/labs/marked/parser/PlainText.tsx
index 498c7b50..41c45de5 100644
--- a/web/src/labs/marked/parser/PlainText.tsx
+++ b/web/src/labs/marked/parser/PlainText.tsx
@@ -1,4 +1,3 @@
-import { escape } from "lodash-es";
import { matcher } from "../matcher";
export const PLAIN_TEXT_REG = /(.+)/;
@@ -9,7 +8,7 @@ const renderer = (rawStr: string): string => {
return rawStr;
}
- return `${escape(matchResult[1])}`;
+ return matchResult[1];
};
export default {
diff --git a/web/src/labs/marked/parser/Strikethrough.tsx b/web/src/labs/marked/parser/Strikethrough.tsx
index 5b0cb98b..64d8d0b2 100644
--- a/web/src/labs/marked/parser/Strikethrough.tsx
+++ b/web/src/labs/marked/parser/Strikethrough.tsx
@@ -1,4 +1,3 @@
-import { escape } from "lodash";
import { matcher } from "../matcher";
export const STRIKETHROUGH_REG = /~~(.+?)~~/;
@@ -9,7 +8,7 @@ const renderer = (rawStr: string) => {
return rawStr;
}
- return