Skip to content

Commit

Permalink
🎨 Protyle Add block icon siyuan-note/siyuan#13945
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jan 26, 2025
1 parent 911e30e commit c09fdb5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion javascript/lute.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion javascript/lute.min.js.map

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions protyle.go
Original file line number Diff line number Diff line change
Expand Up @@ -1921,6 +1921,11 @@ func (lute *Lute) genASTContenteditable(n *html.Node, tree *parse.Tree) {
func (lute *Lute) setBlockIAL(n *html.Node, node *ast.Node) (ialTokens []byte) {
node.SetIALAttr("id", node.ID)

if icon := util.DomAttrValue(n, "icon"); "" != icon {
node.SetIALAttr("icon", icon)
ialTokens = append(ialTokens, []byte(" icon=\""+icon+"\"")...)
}

if refcount := util.DomAttrValue(n, "refcount"); "" != refcount {
node.SetIALAttr("refcount", refcount)
ialTokens = append(ialTokens, []byte(" refcount=\""+refcount+"\"")...)
Expand Down

0 comments on commit c09fdb5

Please sign in to comment.