From 880e04a8f70ae7ab0649203809e70e3a33626640 Mon Sep 17 00:00:00 2001 From: BoHong Li Date: Wed, 26 Feb 2020 10:47:50 +0800 Subject: [PATCH] feat: support multi-row table and row span please see https://github.com/RedBug312/markdown-it-multimd-table for more syntax example Signed-off-by: BoHong Li --- package-lock.json | 22 ++++++++++++++++++++++ package.json | 1 + public/js/extra.js | 5 +++++ 3 files changed, 28 insertions(+) diff --git a/package-lock.json b/package-lock.json index 41b919bc3a..181cb15fc0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11657,6 +11657,28 @@ "resolved": "https://registry.npmjs.org/markdown-it-mathjax/-/markdown-it-mathjax-2.0.0.tgz", "integrity": "sha1-ritPTFxxmgP55HXGZPeyaFIx2ek=" }, + "markdown-it-multimd-table": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/markdown-it-multimd-table/-/markdown-it-multimd-table-4.0.1.tgz", + "integrity": "sha512-ZgRV8LlGz6JXTZ5zd82yCL8IVG5MRastMWxxrc6hQC8aC8kq/7zpp+ksBqVqcdTmTdabnkuSo/7h3SyKM31YCA==", + "requires": { + "markdown-it": "^8.4.2" + }, + "dependencies": { + "markdown-it": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", + "integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==", + "requires": { + "argparse": "^1.0.7", + "entities": "~1.1.1", + "linkify-it": "^2.0.0", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + } + } + } + }, "markdown-it-regexp": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/markdown-it-regexp/-/markdown-it-regexp-0.4.0.tgz", diff --git a/package.json b/package.json index 9895737da2..2c4c123c76 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,7 @@ "markdown-it-ins": "~2.0.0", "markdown-it-mark": "~2.0.0", "markdown-it-mathjax": "~2.0.0", + "markdown-it-multimd-table": "^4.0.1", "markdown-it-regexp": "~0.4.0", "markdown-it-sub": "~1.0.0", "markdown-it-sup": "~1.0.0", diff --git a/public/js/extra.js b/public/js/extra.js index 39dc2a7a50..699e702a0b 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -1056,6 +1056,11 @@ md.use(require('markdown-it-mathjax')({ })) md.use(require('markdown-it-imsize')) md.use(require('markdown-it-ruby')) +md.use(require('markdown-it-multimd-table'), { + multiline: true, + rowspan: true, + headerless: false +}) window.emojify.setConfig({ blacklist: {