feat: support MultiMarkdown tables (#2126)

This commit is contained in:
Regev Brody
2020-07-04 00:46:07 +03:00
committed by GitHub
parent cf3a48a6fa
commit 41327dd1e8
5 changed files with 37 additions and 0 deletions

View File

@@ -228,6 +228,7 @@ import mdAbbr from 'markdown-it-abbr'
import mdSup from 'markdown-it-sup'
import mdSub from 'markdown-it-sub'
import mdMark from 'markdown-it-mark'
import mdMultiTable from 'markdown-it-multimd-table'
import mdFootnote from 'markdown-it-footnote'
import mdImsize from 'markdown-it-imsize'
import katex from 'katex'
@@ -287,6 +288,7 @@ const md = new MarkdownIt({
.use(mdAbbr)
.use(mdSup)
.use(mdSub)
.use(mdMultiTable, {multiline: true, rowspan: true, headerless: true})
.use(mdMark)
.use(mdFootnote)
.use(mdImsize)

View File

@@ -114,6 +114,7 @@
"markdown-it-imsize": "2.0.1",
"markdown-it-mark": "3.0.0",
"markdown-it-mathjax": "2.0.0",
"markdown-it-multimd-table": "4.0.2",
"markdown-it-sub": "1.0.0",
"markdown-it-sup": "1.0.0",
"markdown-it-task-lists": "2.1.1",

View File

@@ -0,0 +1,23 @@
key: markdownMultiTable
title: MultiMarkdown Table
description: Add MultiMarkdown table support
author: requarks.io
icon: mdi-table
enabledDefault: false
dependsOn: markdownCore
props:
multilineEnabled:
type: Boolean
title: Multiline
hint: Enable multiple lines rows
default: true
headerlessEnabled:
type: Boolean
title: Headerless
hint: Enable ommited table headers
default: true
rowspanEnabled:
type: Boolean
title: Rowspan
hint: Enable table row spans
default: true

View File

@@ -0,0 +1,11 @@
const multiTable = require('markdown-it-multimd-table')
module.exports = {
init (md, conf) {
md.use(multiTable, {
multiline: conf.multilineEnabled,
rowspan: conf.rowspanEnabled,
headerless: conf.headerlessEnabled
})
}
}

BIN
yarn.lock

Binary file not shown.