From d75fc76c0cc8ac6a8e1632feb9f8538a4d2d2c19 Mon Sep 17 00:00:00 2001 From: Jaeseo Park <20038316+jaeseopark@users.noreply.github.com> Date: Fri, 28 Jul 2023 12:34:42 -0600 Subject: [PATCH] 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 --- package.json | 1 + .../modules/rendering/markdown-pivot-table/definition.yml | 8 ++++++++ server/modules/rendering/markdown-pivot-table/renderer.js | 7 +++++++ 3 files changed, 16 insertions(+) create mode 100644 server/modules/rendering/markdown-pivot-table/definition.yml create mode 100644 server/modules/rendering/markdown-pivot-table/renderer.js diff --git a/package.json b/package.json index 6717e922..906bd16e 100644 --- a/package.json +++ b/package.json @@ -119,6 +119,7 @@ "markdown-it-sub": "1.0.0", "markdown-it-sup": "1.0.0", "markdown-it-task-lists": "2.1.1", + "markdown-it-pivot-table": "1.0.1", "mathjax": "3.2.2", "mime-types": "2.1.35", "moment": "2.29.4", diff --git a/server/modules/rendering/markdown-pivot-table/definition.yml b/server/modules/rendering/markdown-pivot-table/definition.yml new file mode 100644 index 00000000..415c9087 --- /dev/null +++ b/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: {} diff --git a/server/modules/rendering/markdown-pivot-table/renderer.js b/server/modules/rendering/markdown-pivot-table/renderer.js new file mode 100644 index 00000000..8e4cb246 --- /dev/null +++ b/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) + } +}