🎨 Use real theme style value replace var in preview mode https://github.com/siyuan-note/siyuan/issues/11490
This commit is contained in:
parent
5adb01ef85
commit
aa817d17ef
1 changed files with 2 additions and 3 deletions
|
@ -544,6 +544,8 @@ func Preview(id string) (retStdHTML string, retOutline []*Path) {
|
|||
addBlockIALNodes(tree, false)
|
||||
md := treenode.FormatNode(tree.Root, luteEngine)
|
||||
tree = parse.Parse("", []byte(md), luteEngine.ParseOptions)
|
||||
// 使用实际主题样式值替换样式变量 Use real theme style value replace var in preview mode https://github.com/siyuan-note/siyuan/issues/11458
|
||||
fillThemeStyleVar(tree)
|
||||
retStdHTML = luteEngine.ProtylePreview(tree, luteEngine.RenderOptions)
|
||||
|
||||
if footnotesDefBlock := tree.Root.ChildByType(ast.NodeFootnotesDefBlock); nil != footnotesDefBlock {
|
||||
|
@ -879,9 +881,6 @@ func ExportHTML(id, savePath string, pdf, image, keepFold, merge bool) (name, do
|
|||
// 使用属性 `data-export-html` 导出时 `<style></style>` 标签丢失 https://github.com/siyuan-note/siyuan/issues/6228
|
||||
luteEngine.SetSanitize(false)
|
||||
|
||||
// 使用实际主题样式值替换样式变量 Use real theme style value replace var in preview mode https://github.com/siyuan-note/siyuan/issues/11458
|
||||
fillThemeStyleVar(tree)
|
||||
|
||||
renderer := render.NewProtyleExportRenderer(tree, luteEngine.RenderOptions)
|
||||
dom = gulu.Str.FromBytes(renderer.Render())
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue