mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +01:00
🎨 Improve callout block https://github.com/siyuan-note/siyuan/issues/16607 https://ld246.com/article/1766149237514
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
7b1a04b332
commit
5ec41ff6cb
1 changed files with 9 additions and 1 deletions
|
|
@ -187,7 +187,15 @@ func nodeStaticContent(node *ast.Node, excludeTypes []string, includeTextMarkATi
|
||||||
buf.WriteString(n.CalloutIcon + " ")
|
buf.WriteString(n.CalloutIcon + " ")
|
||||||
}
|
}
|
||||||
if "" != n.CalloutTitle {
|
if "" != n.CalloutTitle {
|
||||||
buf.WriteString(n.CalloutTitle + " ")
|
if titleTree := parse.Inline("", []byte(n.CalloutTitle), luteEngine.ParseOptions); nil != titleTree && nil != titleTree.Root.FirstChild.FirstChild {
|
||||||
|
var inlines []*ast.Node
|
||||||
|
for c := titleTree.Root.FirstChild.FirstChild; nil != c; c = c.Next {
|
||||||
|
inlines = append(inlines, c)
|
||||||
|
}
|
||||||
|
for _, inline := range inlines {
|
||||||
|
buf.WriteString(inline.Content())
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ast.WalkContinue
|
return ast.WalkContinue
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue