|
@@ -422,7 +422,6 @@ export const generateSimpleViewOptions = (config: RendererConfig, pagePath: stri
|
|
|
rehypePlugins.push(
|
|
rehypePlugins.push(
|
|
|
[lsxGrowiPlugin.rehypePlugin, { pagePath }],
|
|
[lsxGrowiPlugin.rehypePlugin, { pagePath }],
|
|
|
[keywordHighlighter.rehypePlugin, { keywords: highlightKeywords }],
|
|
[keywordHighlighter.rehypePlugin, { keywords: highlightKeywords }],
|
|
|
- katex,
|
|
|
|
|
);
|
|
);
|
|
|
if (config.isEnabledXssPrevention) {
|
|
if (config.isEnabledXssPrevention) {
|
|
|
rehypePlugins.push(
|
|
rehypePlugins.push(
|
|
@@ -432,6 +431,9 @@ export const generateSimpleViewOptions = (config: RendererConfig, pagePath: stri
|
|
|
)],
|
|
)],
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
+ rehypePlugins.push(
|
|
|
|
|
+ katex,
|
|
|
|
|
+ );
|
|
|
|
|
|
|
|
// add components
|
|
// add components
|
|
|
if (components != null) {
|
|
if (components != null) {
|
|
@@ -464,7 +466,6 @@ export const generatePreviewOptions = (config: RendererConfig, pagePath: string)
|
|
|
rehypePlugins.push(
|
|
rehypePlugins.push(
|
|
|
[lsxGrowiPlugin.rehypePlugin, { pagePath }],
|
|
[lsxGrowiPlugin.rehypePlugin, { pagePath }],
|
|
|
addLineNumberAttribute.rehypePlugin,
|
|
addLineNumberAttribute.rehypePlugin,
|
|
|
- katex,
|
|
|
|
|
);
|
|
);
|
|
|
if (config.isEnabledXssPrevention) {
|
|
if (config.isEnabledXssPrevention) {
|
|
|
rehypePlugins.push([sanitize, deepmerge(
|
|
rehypePlugins.push([sanitize, deepmerge(
|
|
@@ -473,6 +474,9 @@ export const generatePreviewOptions = (config: RendererConfig, pagePath: string)
|
|
|
addLineNumberAttribute.sanitizeOption,
|
|
addLineNumberAttribute.sanitizeOption,
|
|
|
)]);
|
|
)]);
|
|
|
}
|
|
}
|
|
|
|
|
+ rehypePlugins.push(
|
|
|
|
|
+ katex,
|
|
|
|
|
+ );
|
|
|
// add components
|
|
// add components
|
|
|
if (components != null) {
|
|
if (components != null) {
|
|
|
components.lsx = props => <Lsx {...props} />;
|
|
components.lsx = props => <Lsx {...props} />;
|