bisheng-plugin-local-img
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -12,6 +12,9 @@ 'use strict'; | ||
const children = JsonML.isElement(jml) ? JsonML.getChildren(jml) : []; | ||
if (children.length < 2) { | ||
if (children.length < 1) { | ||
convert(jml); | ||
} else { | ||
children.forEach(child => { | ||
if (JsonML.isElement(child) && JsonML.getTagName(child) === 'p') { | ||
child[0] = 'div'; | ||
} | ||
findImgElment(child); | ||
@@ -40,8 +43,6 @@ }); | ||
const { content } = markdownData; | ||
if (markdownData.meta && markdownData.meta.title == '文档标题 也作为菜单名称') { | ||
if (Array.isArray(content)) { | ||
findImgElment(markdownData.content); | ||
} | ||
if (Array.isArray(content)) { | ||
findImgElment(markdownData.content); | ||
} | ||
return markdownData; | ||
}; |
{ | ||
"name": "bisheng-plugin-local-img", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "change <img> to React code block if src is local file path", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
1916
42