mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
@@ -47,7 +47,7 @@ export const marked = (markdownStr: string, blockParsers = blockElementParserLis
|
||||
const matchedLength = matchedStr.length;
|
||||
const prefixStr = markdownStr.slice(0, matchedIndex);
|
||||
const suffixStr = markdownStr.slice(matchedIndex + matchedLength);
|
||||
return prefixStr + matchedInlineParser.renderer(matchedStr) + marked(suffixStr, [], inlineParsers);
|
||||
return marked(prefixStr, [], inlineParsers) + matchedInlineParser.renderer(matchedStr) + marked(suffixStr, [], inlineParsers);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
import { escape } from "lodash";
|
||||
import { marked } from "..";
|
||||
import Link from "./Link";
|
||||
|
||||
@@ -15,7 +14,7 @@ const renderer = (rawStr: string): string => {
|
||||
return rawStr;
|
||||
}
|
||||
|
||||
const parsedContent = marked(escape(matchResult[1]), [], [Link]);
|
||||
const parsedContent = marked(matchResult[1], [], [Link]);
|
||||
return `<strong>${parsedContent}</strong>`;
|
||||
};
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
import { escape } from "lodash";
|
||||
import { marked } from "..";
|
||||
import Link from "./Link";
|
||||
|
||||
@@ -15,7 +14,7 @@ const renderer = (rawStr: string): string => {
|
||||
return rawStr;
|
||||
}
|
||||
|
||||
const parsedContent = marked(escape(matchResult[1]), [], [Link]);
|
||||
const parsedContent = marked(matchResult[1], [], [Link]);
|
||||
return `<strong><em>${parsedContent}</em></strong>`;
|
||||
};
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
import { escape } from "lodash";
|
||||
import { marked } from "..";
|
||||
import Link from "./Link";
|
||||
|
||||
@@ -15,7 +14,7 @@ const renderer = (rawStr: string): string => {
|
||||
return rawStr;
|
||||
}
|
||||
|
||||
const parsedContent = marked(escape(matchResult[1]), [], [Link]);
|
||||
const parsedContent = marked(matchResult[1], [], [Link]);
|
||||
return `<em>${parsedContent}</em>`;
|
||||
};
|
||||
|
||||
|
@@ -17,7 +17,7 @@ const renderer = (rawStr: string): string => {
|
||||
if (!matchResult) {
|
||||
return rawStr;
|
||||
}
|
||||
const parsedContent = marked(escape(matchResult[1]), [], [InlineCode, BoldEmphasis, Emphasis, Bold]);
|
||||
const parsedContent = marked(matchResult[1], [], [InlineCode, BoldEmphasis, Emphasis, Bold]);
|
||||
return `<a class='link' target='_blank' rel='noreferrer' href='${escape(matchResult[2])}'>${parsedContent}</a>`;
|
||||
};
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { marked } from "..";
|
||||
import { escape } from "lodash";
|
||||
|
||||
export const STRIKETHROUGH_REG = /~~(.+?)~~/;
|
||||
|
||||
@@ -13,8 +13,7 @@ const renderer = (rawStr: string): string => {
|
||||
return rawStr;
|
||||
}
|
||||
|
||||
const parsedContent = marked(matchResult[1], [], []);
|
||||
return `<del>${parsedContent}</del>`;
|
||||
return `<del>${escape(matchResult[1])}</del>`;
|
||||
};
|
||||
|
||||
export default {
|
||||
|
Reference in New Issue
Block a user