Skip to content

Commit 635bcd7

Browse files
committedSep 29, 2024
🐛 Fix protyle md rendering NPE https://ld246.com/article/1727572345197
1 parent 0c0a843 commit 635bcd7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎render/protyle_export_md_renderer.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,10 @@ func (r *ProtyleExportMdRenderer) renderMdMarker(node *ast.Node, entering bool)
300300
}
301301
types = tmp
302302

303+
if 1 > len(types) {
304+
return
305+
}
306+
303307
typ := types[0]
304308
if "a" == typ || "inline-memo" == typ || "block-ref" == typ || "file-annotation-ref" == typ || "inline-math" == typ {
305309
types := types[1:]

0 commit comments

Comments
 (0)
Please sign in to comment.