🎨 Improve handling of assets when exporting to Word .docx format https://github.com/siyuan-note/siyuan/issues/15253

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-01-09 23:28:57 +08:00
parent 03b5067b9e
commit 0bc96f4d75
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 15 additions and 11 deletions

View file

@ -316,8 +316,12 @@ func FilterSelfChildDocs(paths []string) (ret []string) {
return
}
func IsAssetLinkDest(dest []byte, includePublic bool) bool {
return bytes.HasPrefix(dest, []byte("assets/")) || (includePublic && bytes.HasPrefix(dest, []byte("public/")))
func IsAssetLinkDest(dest []byte, includeServePath bool) bool {
return bytes.HasPrefix(dest, []byte("assets/")) ||
(includeServePath && (bytes.HasPrefix(dest, []byte("emojis/")) ||
bytes.HasPrefix(dest, []byte("plugins/")) ||
bytes.HasPrefix(dest, []byte("public/")) ||
bytes.HasPrefix(dest, []byte("widgets/"))))
}
var (