소스 검색

feat: add markdown-it-pivot-table rendering module (#6574)

* feat: markdown-it-pivot-table

* chore: upgrade dependency version

* style: remove semicolon in renderer.js

---------

Co-authored-by: Nicolas Giard <github@ngpixel.com>
Jaeseo Park 1 년 전
부모
커밋
d75fc76c0c
3개의 변경된 파일16개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      package.json
  2. 8 0
      server/modules/rendering/markdown-pivot-table/definition.yml
  3. 7 0
      server/modules/rendering/markdown-pivot-table/renderer.js

+ 1 - 0
package.json

@@ -119,6 +119,7 @@
     "markdown-it-sub": "1.0.0",
     "markdown-it-sub": "1.0.0",
     "markdown-it-sup": "1.0.0",
     "markdown-it-sup": "1.0.0",
     "markdown-it-task-lists": "2.1.1",
     "markdown-it-task-lists": "2.1.1",
+    "markdown-it-pivot-table": "1.0.1",
     "mathjax": "3.2.2",
     "mathjax": "3.2.2",
     "mime-types": "2.1.35",
     "mime-types": "2.1.35",
     "moment": "2.29.4",
     "moment": "2.29.4",

+ 8 - 0
server/modules/rendering/markdown-pivot-table/definition.yml

@@ -0,0 +1,8 @@
+key: markdownPivotTable
+title: Pivot Table
+description: Add pivot table support
+author: jaeseopark
+icon: mdi-table
+enabledDefault: false
+dependsOn: markdownCore
+props: {}

+ 7 - 0
server/modules/rendering/markdown-pivot-table/renderer.js

@@ -0,0 +1,7 @@
+const pivotTable = require('markdown-it-pivot-table')
+
+module.exports = {
+  init (md) {
+    md.use(pivotTable)
+  }
+}