This commit is contained in:
tangjinzhou 2018-01-25 11:02:07 +08:00
parent 46ba224658
commit ffa18fa7ef
2 changed files with 4 additions and 4 deletions

View File

@ -76,8 +76,8 @@
"stylelint": "^8.1.1",
"stylelint-config-standard": "^17.0.0",
"transliteration": "^1.6.2",
"vue-antd-md-loader": "^1.0.1",
"vue-loader": "^13.0.5",
"vue-markdown-loader": "^2.3.0",
"vue-router": "^3.0.1",
"vue-template-compiler": "^2.5.13",
"webpack": "^3.6.0",

View File

@ -5,7 +5,7 @@ const Token = require('markdown-it/lib/token')
const cheerio = require('cheerio')
const fetch = (str, tag) => {
const $ = cheerio.load(str, { decodeEntities: false })
const $ = cheerio.load(str, { decodeEntities: false, xmlMode: true })
if (!tag) return str
return $(tag).html()
@ -131,8 +131,8 @@ module.exports = {
test: /\.md/,
use: [
{
loader: 'vue-markdown-loader',
options: Object.assign(md, { wrapper: 'section', preventExtract: true }),
loader: 'vue-antd-md-loader',
options: md,
},
],
},