mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
23c6f278f1
1 changed files with 5 additions and 0 deletions
|
|
@ -22,6 +22,7 @@ import (
|
|||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/88250/gulu"
|
||||
"github.com/88250/lute/ast"
|
||||
"github.com/88250/lute/parse"
|
||||
"github.com/gorilla/css/scanner"
|
||||
|
|
@ -54,6 +55,10 @@ func fillThemeStyleVar(tree *parse.Tree) {
|
|||
buf.WriteString(style)
|
||||
buf.WriteString(": ")
|
||||
value := themeStyles[name]
|
||||
if strings.Contains(value, "var(") {
|
||||
name = gulu.Str.SubStringBetween(value, "(", ")")
|
||||
value = themeStyles[name]
|
||||
}
|
||||
if "" == value {
|
||||
// 回退为变量
|
||||
buf.WriteString("var(")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue