Skip to content

Commit

Permalink
🎨 Improve HTML clipping siyuan-note/siyuan#12946
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Oct 28, 2024
1 parent 9028c98 commit 91bbe8c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions h2m.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,10 @@ func (lute *Lute) genASTByDOM(n *html.Node, tree *parse.Tree) {
}
}

if atom.Div == n.DataAtom || atom.Section == n.DataAtom {
break
}

node.Type = ast.NodeParagraph
tree.Context.Tip.AppendChild(node)
tree.Context.Tip = node
Expand Down
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.

7 changes: 4 additions & 3 deletions test/h2m_test.go

Large diffs are not rendered by default.

0 comments on commit 91bbe8c

Please sign in to comment.