Skip to content

Commit

Permalink
Add markdown alert parsing, fix buffer issue when switching files (#988)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
esimkowitz authored Oct 8, 2024
1 parent 2e27296 commit d2b2491
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 118 deletions.
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

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

** Please do not report security vulnerabilities through public github issues. **
**Please do not report security vulnerabilities through public github issues.**
3 changes: 2 additions & 1 deletion frontend/app/element/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import rehypeSanitize, { defaultSchema } from "rehype-sanitize";
import rehypeSlug from "rehype-slug";
import RemarkFlexibleToc, { TocItem } from "remark-flexible-toc";
import remarkGfm from "remark-gfm";
import { remarkAlert } from "remark-github-blockquote-alert";
import { openLink } from "../store/global";
import { IconButton } from "./iconbutton";
import "./markdown.less";
Expand Down Expand Up @@ -258,7 +259,7 @@ const Markdown = ({
options={{ scrollbars: { autoHide: "leave" } }}
>
<ReactMarkdown
remarkPlugins={[remarkGfm, [RemarkFlexibleToc, { tocRef: tocRef.current }]]}
remarkPlugins={[remarkGfm, remarkAlert, [RemarkFlexibleToc, { tocRef: tocRef.current }]]}
rehypePlugins={[
rehypeRaw,
rehypeHighlight,
Expand Down
Loading

0 comments on commit d2b2491

Please sign in to comment.