Skip to content

Commit a06da15

Browse files
committed
🎨 Improve exporting docx #14825
1 parent 2d0edc1 commit a06da15

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

kernel/model/export.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,11 @@ func ExportMarkdownHTML(id, savePath string, docx, merge bool) (name, dom string
793793
n.ListData.Start = li.ListData.Num
794794
}
795795
}
796+
} else if n.IsTextMarkType("code") {
797+
if nil != n.Next && ast.NodeText == n.Next.Type {
798+
// 行级代码导出 word 之后会有多余的零宽空格 https://github.com/siyuan-note/siyuan/issues/14825
799+
n.Next.Tokens = bytes.TrimPrefix(n.Tokens, []byte(editor.Zwsp))
800+
}
796801
}
797802
return ast.WalkContinue
798803
})

0 commit comments

Comments
 (0)