Skip to content

Commit a7baa0a

Browse files
committed
FEATURE: Type footnotes in Markdown format (closes #331).
Thanks to GitHub flavored Markdown, you can also type tables, task lists, code blocks and spans, etc. See https://github.github.com/gfm/
1 parent f6e3ebf commit a7baa0a

File tree

3 files changed

+297
-1
lines changed

3 files changed

+297
-1
lines changed

frontend/package-lock.json

Lines changed: 294 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"react-notifications": "^1.7.4",
2020
"react-router-dom": "^6.4.3",
2121
"remark-definition-list": "^2.0.0",
22+
"remark-gfm": "^4.0.1",
2223
"remark-unwrap-images": "^4.0.0",
2324
"uuid": "^11.0.5",
2425
"vite-plugin-eslint": "^1.8.1",

frontend/src/components/FormattedText.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import ReactMarkdown from 'react-markdown';
2+
import remarkGfm from 'remark-gfm';
23
import remarkUnwrapImages from 'remark-unwrap-images';
34
import { remarkDefinitionList, defListHastHandlers } from 'remark-definition-list';
45
import CroppedImage from './CroppedImage';
@@ -17,7 +18,7 @@ function FormattedText({children, setHighlightedText, selectable, setSelectedTex
1718

1819
return (<>
1920
<ReactMarkdown
20-
remarkPlugins={[remarkDefinitionList, remarkUnwrapImages]}
21+
remarkPlugins={[remarkGfm, remarkDefinitionList, remarkUnwrapImages]}
2122
components={{
2223
img: (x) => embedVideo(x) || CroppedImage(x),
2324
p: (x) => VideoComment(x)

0 commit comments

Comments
 (0)