Yohei-Shiina 3 лет назад
Родитель
Сommit
3b551fff52
1 измененных файлов с 6 добавлено и 2 удалено
  1. 6 2
      packages/app/src/services/renderer/renderer.tsx

+ 6 - 2
packages/app/src/services/renderer/renderer.tsx

@@ -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} />;