mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-10 02:38:50 +01:00
🎨 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:
parent
9e2a0f59bc
commit
feb5f0cefe
1 changed files with 3 additions and 0 deletions
|
|
@ -800,6 +800,9 @@ func ExportMarkdownHTML(id, savePath string, docx, merge bool) (name, dom string
|
|||
if ast.NodeLinkDest == n.Type {
|
||||
if bytes.HasPrefix(n.Tokens, []byte("file://")) {
|
||||
n.Tokens = bytes.ReplaceAll(n.Tokens, []byte("\\"), []byte("/"))
|
||||
if !bytes.HasPrefix(n.Tokens, []byte("file:///")) {
|
||||
n.Tokens = bytes.ReplaceAll(n.Tokens, []byte("file://"), []byte("file:///"))
|
||||
}
|
||||
}
|
||||
}
|
||||
return ast.WalkContinue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue