feat: underline markdown support (#2073)

* fix: no markdown support for underline #2072
This commit is contained in:
Regev Brody
2020-06-19 01:37:24 +03:00
committed by GitHub
parent 0e6340f51e
commit e03a80dccc
5 changed files with 39 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
const md = require('markdown-it')
const mdAttrs = require('markdown-it-attrs')
const _ = require('lodash')
const underline = require('./underline')
const quoteStyles = {
Chinese: '””‘’',
@@ -30,6 +31,10 @@ module.exports = {
}
})
if (this.config.underline) {
mkdown.use(underline)
}
mkdown.use(mdAttrs, {
allowedAttributes: ['id', 'class', 'target']
})