Skip to content

Commit d2b2491

Browse files
authored
Add markdown alert parsing, fix buffer issue when switching files (#988)
Adds the GitHub alert syntax parsing to the markdown element, fixes an issue where the file edit buffer was not getting unset when the file path changed, continues my crusade on star imports
1 parent 2e27296 commit d2b2491

File tree

5 files changed

+125
-118
lines changed

5 files changed

+125
-118
lines changed

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
To report vulnerabilities or security concerns, please email us at: [[email protected]](mailto:[email protected])
44

5-
** Please do not report security vulnerabilities through public github issues. **
5+
**Please do not report security vulnerabilities through public github issues.**

frontend/app/element/markdown.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import rehypeSanitize, { defaultSchema } from "rehype-sanitize";
1717
import rehypeSlug from "rehype-slug";
1818
import RemarkFlexibleToc, { TocItem } from "remark-flexible-toc";
1919
import remarkGfm from "remark-gfm";
20+
import { remarkAlert } from "remark-github-blockquote-alert";
2021
import { openLink } from "../store/global";
2122
import { IconButton } from "./iconbutton";
2223
import "./markdown.less";
@@ -258,7 +259,7 @@ const Markdown = ({
258259
options={{ scrollbars: { autoHide: "leave" } }}
259260
>
260261
<ReactMarkdown
261-
remarkPlugins={[remarkGfm, [RemarkFlexibleToc, { tocRef: tocRef.current }]]}
262+
remarkPlugins={[remarkGfm, remarkAlert, [RemarkFlexibleToc, { tocRef: tocRef.current }]]}
262263
rehypePlugins={[
263264
rehypeRaw,
264265
rehypeHighlight,

0 commit comments

Comments
 (0)