Просмотр исходного кода

add devlop to getTranspliePackages

reiji-h 2 лет назад
Родитель
Сommit
aaad69cdb3
2 измененных файлов с 6 добавлено и 3 удалено
  1. 1 0
      apps/app/next.config.js
  2. 5 3
      apps/app/src/services/renderer/remark-plugins/slides.ts

+ 1 - 0
apps/app/next.config.js

@@ -26,6 +26,7 @@ const getTranspilePackages = () => {
     'character-entities-legacy',
     'character-entities-legacy',
     'comma-separated-tokens',
     'comma-separated-tokens',
     'decode-named-character-reference',
     'decode-named-character-reference',
+    'devlop',
     'escape-string-regexp',
     'escape-string-regexp',
     'hastscript',
     'hastscript',
     'html-void-elements',
     'html-void-elements',

+ 5 - 3
apps/app/src/services/renderer/remark-plugins/slides.ts

@@ -1,5 +1,7 @@
 import type { Schema as SanitizeOption } from 'hast-util-sanitize';
 import type { Schema as SanitizeOption } from 'hast-util-sanitize';
 import type { Root } from 'mdast';
 import type { Root } from 'mdast';
+import { frontmatterToMarkdown } from 'mdast-util-frontmatter';
+import { gfmToMarkdown } from 'mdast-util-gfm';
 import { toMarkdown } from 'mdast-util-to-markdown';
 import { toMarkdown } from 'mdast-util-to-markdown';
 import type { Plugin } from 'unified';
 import type { Plugin } from 'unified';
 import type { Node } from 'unist';
 import type { Node } from 'unist';
@@ -40,10 +42,10 @@ const rewriteNode = (tree: Node, node: Node) => {
       marp: marp ? 'marp' : '',
       marp: marp ? 'marp' : '',
       children: toMarkdown(tree as Root, {
       children: toMarkdown(tree as Root, {
         extensions: [
         extensions: [
-          // frontmatterToMarkdown(['yaml']),
-          // gfmToMarkdown(),
+          frontmatterToMarkdown(['yaml']),
+          gfmToMarkdown(),
           // TODO: add new extension remark-growi-directive to markdown
           // TODO: add new extension remark-growi-directive to markdown
-          // https://redmine.weseek.co.jp/issues/126660
+          // https://redmine.weseek.co.jp/issues/126744
         ],
         ],
       }),
       }),
     };
     };