Allow simple HTML tags such as details, summary, etc... similar to Github (#2062)

This commit is contained in:
Tan Nhu 2024-05-23 22:08:59 +00:00 committed by Harness
parent 1f43f091de
commit ed484b0d44
4 changed files with 664 additions and 749 deletions

View File

@ -184,7 +184,11 @@ module.exports = {
}, },
resolve: { resolve: {
extensions: ['.mjs', '.js', '.ts', '.tsx', '.json', '.ttf', '.scss'], extensions: ['.mjs', '.js', '.ts', '.tsx', '.json', '.ttf', '.scss'],
plugins: [new TsconfigPathsPlugin()] plugins: [new TsconfigPathsPlugin()],
alias: {
'react/jsx-dev-runtime': 'react/jsx-dev-runtime.js',
'react/jsx-runtime': 'react/jsx-runtime.js'
}
}, },
plugins: [ plugins: [
new MiniCssExtractPlugin({ new MiniCssExtractPlugin({

View File

@ -51,7 +51,7 @@
"@uiw/codemirror-extensions-color": "^4.19.9", "@uiw/codemirror-extensions-color": "^4.19.9",
"@uiw/codemirror-extensions-hyper-link": "^4.19.9", "@uiw/codemirror-extensions-hyper-link": "^4.19.9",
"@uiw/codemirror-themes-all": "^4.19.9", "@uiw/codemirror-themes-all": "^4.19.9",
"@uiw/react-markdown-preview": "^4.1.12", "@uiw/react-markdown-preview": "^5.1.1",
"anser": "^2.1.1", "anser": "^2.1.1",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"clipboard-copy": "^3.1.0", "clipboard-copy": "^3.1.0",
@ -85,9 +85,9 @@
"react-split-pane": "^0.1.92", "react-split-pane": "^0.1.92",
"react-table": "^7.1.0", "react-table": "^7.1.0",
"react-timeago": "^4.4.0", "react-timeago": "^4.4.0",
"rehype-external-links": "^2.0.1", "rehype-external-links": "^3.0.0",
"rehype-sanitize": "^6.0.0", "rehype-sanitize": "^6.0.0",
"rehype-video": "^1.2.2", "rehype-video": "^2.0.2",
"restful-react": "15.6.0", "restful-react": "15.6.0",
"selecto": "^1.26.3", "selecto": "^1.26.3",
"webpack-retry-chunk-load-plugin": "^3.1.0", "webpack-retry-chunk-load-plugin": "^3.1.0",

View File

@ -102,7 +102,6 @@ export function MarkdownViewer({
ref={ref}> ref={ref}>
<MarkdownPreview <MarkdownPreview
source={source} source={source}
skipHtml={false}
warpperElement={{ 'data-color-mode': darkMode ? 'dark' : 'light' }} warpperElement={{ 'data-color-mode': darkMode ? 'dark' : 'light' }}
rehypeRewrite={(node, _index, parent) => { rehypeRewrite={(node, _index, parent) => {
if ((node as unknown as HTMLDivElement).tagName === 'a') { if ((node as unknown as HTMLDivElement).tagName === 'a') {

File diff suppressed because it is too large Load Diff