|
|
@@ -26,6 +26,7 @@ import * as addLineNumberAttribute from '~/services/renderer/rehype-plugins/add-
|
|
|
import * as keywordHighlighter from '~/services/renderer/rehype-plugins/keyword-highlighter';
|
|
|
import * as relocateToc from '~/services/renderer/rehype-plugins/relocate-toc';
|
|
|
import * as attachment from '~/services/renderer/remark-plugins/attachment';
|
|
|
+import * as codeBlock from '~/services/renderer/remark-plugins/codeblock';
|
|
|
import * as plantuml from '~/services/renderer/remark-plugins/plantuml';
|
|
|
import * as xsvToTable from '~/services/renderer/remark-plugins/xsv-to-table';
|
|
|
import {
|
|
|
@@ -80,6 +81,7 @@ export const generateViewOptions = (
|
|
|
attachment.sanitizeOption,
|
|
|
lsxGrowiDirective.sanitizeOption,
|
|
|
refsGrowiDirective.sanitizeOption,
|
|
|
+ codeBlock.sanitizeOption,
|
|
|
)]
|
|
|
: () => {};
|
|
|
|
|
|
@@ -132,6 +134,7 @@ export const generateTocOptions = (config: RendererConfig, tocNode: HtmlElementN
|
|
|
const rehypeSanitizePlugin: Pluggable | (() => void) = config.isEnabledXssPrevention
|
|
|
? [sanitize, deepmerge(
|
|
|
getCommonSanitizeOption(config),
|
|
|
+ codeBlock.sanitizeOption,
|
|
|
)]
|
|
|
: () => {};
|
|
|
|
|
|
@@ -185,6 +188,7 @@ export const generateSimpleViewOptions = (
|
|
|
attachment.sanitizeOption,
|
|
|
lsxGrowiDirective.sanitizeOption,
|
|
|
refsGrowiDirective.sanitizeOption,
|
|
|
+ codeBlock.sanitizeOption,
|
|
|
)]
|
|
|
: () => {};
|
|
|
|
|
|
@@ -274,6 +278,7 @@ export const generatePreviewOptions = (config: RendererConfig, pagePath: string)
|
|
|
lsxGrowiDirective.sanitizeOption,
|
|
|
refsGrowiDirective.sanitizeOption,
|
|
|
addLineNumberAttribute.sanitizeOption,
|
|
|
+ codeBlock.sanitizeOption,
|
|
|
)]
|
|
|
: () => {};
|
|
|
|