mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-22 08:16:10 +01:00
🎨 Improve exporting HTML/Word
This commit is contained in:
parent
776b4fd6ee
commit
b5bfbbe14a
4 changed files with 32 additions and 3 deletions
|
|
@ -65,6 +65,8 @@ func InitAppearance() {
|
|||
}
|
||||
|
||||
Conf.Save()
|
||||
|
||||
util.InitEmojiChars()
|
||||
}
|
||||
|
||||
func containTheme(name string, themes []*conf.AppearanceTheme) bool {
|
||||
|
|
|
|||
|
|
@ -962,7 +962,7 @@ func MissingAssets() (ret []string) {
|
|||
|
||||
func emojisInTree(tree *parse.Tree) (ret []string) {
|
||||
if icon := tree.Root.IALAttr("icon"); "" != icon {
|
||||
if !strings.Contains(icon, "://") && !strings.HasPrefix(icon, "api/icon/") {
|
||||
if !strings.Contains(icon, "://") && !strings.HasPrefix(icon, "api/icon/") && !util.NativeEmojiChars[icon] {
|
||||
ret = append(ret, "/emojis/"+icon)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -752,7 +752,6 @@ func ExportMarkdownHTML(id, savePath string, docx, merge bool) (name, dom string
|
|||
to := filepath.Join(savePath, emoji)
|
||||
if err := filelock.Copy(from, to); err != nil {
|
||||
logging.LogErrorf("copy emojis from [%s] to [%s] failed: %s", from, to, err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -910,7 +909,6 @@ func ExportHTML(id, savePath string, pdf, image, keepFold, merge bool) (name, do
|
|||
to := filepath.Join(savePath, emoji)
|
||||
if err := filelock.Copy(from, to); err != nil {
|
||||
logging.LogErrorf("copy emojis from [%s] to [%s] failed: %s", from, to, err)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue