|
@@ -246,6 +246,7 @@ export type RendererOptions = Omit<ReactMarkdownOptions, 'remarkPlugins' | 'rehy
|
|
|
const commonSanitizeOption: SanitizeOption = deepmerge(
|
|
const commonSanitizeOption: SanitizeOption = deepmerge(
|
|
|
sanitizeDefaultSchema,
|
|
sanitizeDefaultSchema,
|
|
|
{
|
|
{
|
|
|
|
|
+ clobberPrefix: 'mdcont-',
|
|
|
attributes: {
|
|
attributes: {
|
|
|
'*': ['class', 'className', 'style'],
|
|
'*': ['class', 'className', 'style'],
|
|
|
},
|
|
},
|
|
@@ -324,6 +325,12 @@ export const generateViewOptions = (
|
|
|
// add rehype plugins
|
|
// add rehype plugins
|
|
|
rehypePlugins.push(
|
|
rehypePlugins.push(
|
|
|
slug,
|
|
slug,
|
|
|
|
|
+ [lsxGrowiPlugin.rehypePlugin, { pagePath }],
|
|
|
|
|
+ [sanitize, deepmerge(
|
|
|
|
|
+ commonSanitizeOption,
|
|
|
|
|
+ lsxGrowiPlugin.sanitizeOption,
|
|
|
|
|
+ )],
|
|
|
|
|
+ katex,
|
|
|
[toc, {
|
|
[toc, {
|
|
|
nav: false,
|
|
nav: false,
|
|
|
headings: ['h1', 'h2', 'h3'],
|
|
headings: ['h1', 'h2', 'h3'],
|
|
@@ -348,12 +355,6 @@ export const generateViewOptions = (
|
|
|
return false; // not show toc in body
|
|
return false; // not show toc in body
|
|
|
},
|
|
},
|
|
|
}],
|
|
}],
|
|
|
- [lsxGrowiPlugin.rehypePlugin, { pagePath }],
|
|
|
|
|
- [sanitize, deepmerge(
|
|
|
|
|
- commonSanitizeOption,
|
|
|
|
|
- lsxGrowiPlugin.sanitizeOption,
|
|
|
|
|
- )],
|
|
|
|
|
- katex,
|
|
|
|
|
// [autoLinkHeadings, {
|
|
// [autoLinkHeadings, {
|
|
|
// behavior: 'append',
|
|
// behavior: 'append',
|
|
|
// }]
|
|
// }]
|