|
|
@@ -10,7 +10,6 @@ import sanitize from 'rehype-sanitize';
|
|
|
import slug from 'rehype-slug';
|
|
|
import type { HtmlElementNode } from 'rehype-toc';
|
|
|
import breaks from 'remark-breaks';
|
|
|
-import remarkFrontmatter from 'remark-frontmatter';
|
|
|
import math from 'remark-math';
|
|
|
import deepmerge from 'ts-deepmerge';
|
|
|
import type { Pluggable } from 'unified';
|
|
|
@@ -19,7 +18,6 @@ import type { Pluggable } from 'unified';
|
|
|
import { DrawioViewerWithEditButton } from '~/components/ReactMarkdownComponents/DrawioViewerWithEditButton';
|
|
|
import { Header } from '~/components/ReactMarkdownComponents/Header';
|
|
|
import { TableWithEditButton } from '~/components/ReactMarkdownComponents/TableWithEditButton';
|
|
|
-import * as frontmatterHider from '~/features/frontmatter-hider';
|
|
|
import * as mermaid from '~/features/mermaid';
|
|
|
import { RehypeSanitizeOption } from '~/interfaces/rehype';
|
|
|
import type { RendererOptions } from '~/interfaces/renderer-options';
|
|
|
@@ -62,7 +60,6 @@ export const generateViewOptions = (
|
|
|
[plantuml.remarkPlugin, { plantumlUri: config.plantumlUri }],
|
|
|
drawio.remarkPlugin,
|
|
|
mermaid.remarkPlugin,
|
|
|
- frontmatterHider.remarkPlugin,
|
|
|
xsvToTable.remarkPlugin,
|
|
|
lsxGrowiDirective.remarkPlugin,
|
|
|
refsGrowiDirective.remarkPlugin,
|
|
|
@@ -112,7 +109,6 @@ export const generateViewOptions = (
|
|
|
components.drawio = DrawioViewerWithEditButton;
|
|
|
components.table = TableWithEditButton;
|
|
|
components.mermaid = mermaid.MermaidViewer;
|
|
|
- components.frontmatterHider = frontmatterHider.FrontmatterHideViewer;
|
|
|
}
|
|
|
|
|
|
if (config.isEnabledXssPrevention) {
|
|
|
@@ -170,8 +166,6 @@ export const generateSimpleViewOptions = (
|
|
|
[plantuml.remarkPlugin, { plantumlUri: config.plantumlUri }],
|
|
|
drawio.remarkPlugin,
|
|
|
mermaid.remarkPlugin,
|
|
|
- remarkFrontmatter,
|
|
|
- frontmatterHider.remarkPlugin,
|
|
|
xsvToTable.remarkPlugin,
|
|
|
lsxGrowiDirective.remarkPlugin,
|
|
|
refsGrowiDirective.remarkPlugin,
|
|
|
@@ -193,7 +187,6 @@ export const generateSimpleViewOptions = (
|
|
|
commonSanitizeOption,
|
|
|
drawio.sanitizeOption,
|
|
|
mermaid.sanitizeOption,
|
|
|
- frontmatterHider.sanitizeOption,
|
|
|
lsxGrowiDirective.sanitizeOption,
|
|
|
refsGrowiDirective.sanitizeOption,
|
|
|
)]
|
|
|
@@ -218,7 +211,6 @@ export const generateSimpleViewOptions = (
|
|
|
components.gallery = refsGrowiDirective.GalleryImmutable;
|
|
|
components.drawio = drawio.DrawioViewer;
|
|
|
components.mermaid = mermaid.MermaidViewer;
|
|
|
- components.frontmatterHider = frontmatterHider.FrontmatterHideViewer;
|
|
|
}
|
|
|
|
|
|
if (config.isEnabledXssPrevention) {
|
|
|
@@ -251,8 +243,6 @@ export const generatePreviewOptions = (config: RendererConfig, pagePath: string)
|
|
|
[plantuml.remarkPlugin, { plantumlUri: config.plantumlUri }],
|
|
|
drawio.remarkPlugin,
|
|
|
mermaid.remarkPlugin,
|
|
|
- remarkFrontmatter,
|
|
|
- frontmatterHider.remarkPlugin,
|
|
|
xsvToTable.remarkPlugin,
|
|
|
lsxGrowiDirective.remarkPlugin,
|
|
|
refsGrowiDirective.remarkPlugin,
|
|
|
@@ -270,7 +260,6 @@ export const generatePreviewOptions = (config: RendererConfig, pagePath: string)
|
|
|
commonSanitizeOption,
|
|
|
drawio.sanitizeOption,
|
|
|
mermaid.sanitizeOption,
|
|
|
- frontmatterHider.sanitizeOption,
|
|
|
lsxGrowiDirective.sanitizeOption,
|
|
|
refsGrowiDirective.sanitizeOption,
|
|
|
addLineNumberAttribute.sanitizeOption,
|
|
|
@@ -296,7 +285,6 @@ export const generatePreviewOptions = (config: RendererConfig, pagePath: string)
|
|
|
components.gallery = refsGrowiDirective.GalleryImmutable;
|
|
|
components.drawio = drawio.DrawioViewer;
|
|
|
components.mermaid = mermaid.MermaidViewer;
|
|
|
- components.frontmatterHider = frontmatterHider.FrontmatterHideViewer;
|
|
|
}
|
|
|
|
|
|
if (config.isEnabledXssPrevention) {
|