GraphContent: disable parsing of inline html and newlines

This commit is contained in:
Liam Fitzgerald 2021-05-10 11:56:37 +10:00
parent 00e2dbe4f4
commit fde77ce5f9
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB
2 changed files with 4 additions and 2 deletions

View File

@ -42,7 +42,7 @@
"react-virtuoso": "^0.20.3",
"react-visibility-sensor": "^5.1.1",
"remark": "^12.0.0",
"remark-breaks": "^2.0.1",
"remark-breaks": "^2.0.2",
"remark-disable-tokenizers": "1.1.0",
"stacktrace-js": "^2.0.2",
"style-loader": "^1.3.0",

View File

@ -1,5 +1,6 @@
import remark from 'remark';
import RemarkDisableTokenizers from 'remark-disable-tokenizers';
import RemarkBreaks from 'remark-breaks';
const DISABLED_BLOCK_TOKENS = [
'indentedCode',
@ -12,7 +13,7 @@ const DISABLED_BLOCK_TOKENS = [
'table',
];
const DISABLED_INLINE_TOKENS = ['autoLink', 'url', 'email', 'reference'];
const DISABLED_INLINE_TOKENS = ['autoLink', 'url', 'email', 'reference', 'html'];
const tallParser = remark().freeze();
@ -27,6 +28,7 @@ const wideParser = remark()
inline: DISABLED_INLINE_TOKENS,
},
],
RemarkBreaks,
])
.freeze();