Browse Source

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

Liang Ding 2 năm trước cách đây
mục cha
commit
3750ca12cc
2 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 0 0
      app/stage/protyle/js/lute/lute.min.js
  2. 3 0
      kernel/model/import.go

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 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]
 			}

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác