fix: lint

This commit is contained in:
purocean
2022-03-07 19:10:23 +08:00
parent c01cebb5d1
commit 5a74e36050
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -177,7 +177,7 @@ export default defineComponent({
}
const startTime = performance.now()
renderEnv = { source: content, file: currentFile.value, renderCount: renderCount++ }
renderEnv = { tokens: [], source: content, file: currentFile.value, renderCount: renderCount++ }
try {
renderContent.value = markdown.render(content, renderEnv)
} catch (error: any) {
+1 -2
View File
@@ -54,12 +54,11 @@ export default {
}
const processImg = async (tokens: Token[]) => {
for (let token of tokens) {
for (const token of tokens) {
if (token.children) {
await processImg(token.children)
}
if (token.tag === 'img' && token.attrGet(ctx.constant.DOM_ATTR_NAME.LOCAL_IMAGE)) {
const srcAttr = token.attrGet('src')
const originSrc = token.attrGet(ctx.constant.DOM_ATTR_NAME.ORIGIN_SRC)