|
|
@@ -28,7 +28,7 @@ import { RendererConfig } from '~/interfaces/services/renderer';
|
|
|
import loggerFactory from '~/utils/logger';
|
|
|
|
|
|
import { addClass } from './rehype-plugins/add-class';
|
|
|
-import { addLineNumberAttribute } from './rehype-plugins/add-line-number-attribute';
|
|
|
+import * as addLineNumberAttribute from './rehype-plugins/add-line-number-attribute';
|
|
|
import { relativeLinks } from './rehype-plugins/relative-links';
|
|
|
import { relativeLinksByPukiwikiLikeLinker } from './rehype-plugins/relative-links-by-pukiwiki-like-linker';
|
|
|
import { pukiwikiLikeLinker } from './remark-plugins/pukiwiki-like-linker';
|
|
|
@@ -439,7 +439,7 @@ export const generatePreviewOptions = (pagePath: string, config: RendererConfig)
|
|
|
rehypePlugins.push(
|
|
|
katex,
|
|
|
[lsxGrowiPlugin.rehypePlugin, { pagePath }],
|
|
|
- addLineNumberAttribute,
|
|
|
+ addLineNumberAttribute.rehypePlugin,
|
|
|
// [autoLinkHeadings, {
|
|
|
// behavior: 'append',
|
|
|
// }]
|
|
|
@@ -448,11 +448,7 @@ export const generatePreviewOptions = (pagePath: string, config: RendererConfig)
|
|
|
const sanitizeOption = deepmerge(
|
|
|
commonSanitizeOption,
|
|
|
lsxGrowiPlugin.sanitizeOption,
|
|
|
- {
|
|
|
- attributes: {
|
|
|
- '*': ['data-line'],
|
|
|
- },
|
|
|
- },
|
|
|
+ addLineNumberAttribute.sanitizeOption,
|
|
|
);
|
|
|
rehypePlugins.push([sanitize, sanitizeOption]);
|
|
|
|