Browse Source

:bug: 导入 Markdown 文件报错 Fix https://github.com/siyuan-note/siyuan/issues/5781

Liang Ding 2 years ago
parent
commit
3750ca12cc
2 changed files with 3 additions and 0 deletions
  1. 0 0
      app/stage/protyle/js/lute/lute.min.js
  2. 3 0
      kernel/model/import.go

File diff suppressed because it is too large
+ 0 - 0
app/stage/protyle/js/lute/lute.min.js


+ 3 - 0
kernel/model/import.go

@@ -606,6 +606,9 @@ func imgHtmlBlock2InlineImg(tree *parse.Tree) {
 				logging.LogErrorf("parse html block [%s] failed: %s", n.Tokens, pErr)
 				return ast.WalkContinue
 			}
+			if 1 > len(htmlNodes) {
+				return ast.WalkContinue
+			}
 			if atom.Img == htmlNodes[0].DataAtom {
 				imgHtmlBlocks[n] = htmlNodes[0]
 			}

Some files were not shown because too many files changed in this diff