Skip to content

Commit

Permalink
🎨 Improve HTML math clipping siyuan-note/siyuan#12677
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Oct 14, 2024
1 parent f6b9eba commit 59a8c9c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion h2m.go
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ func (lute *Lute) genASTByDOM(n *html.Node, tree *parse.Tree) {
return
}

parentInline := nil != n.Parent && atom.Span == n.Parent.DataAtom
parentInline := nil != n.Parent && (atom.Span == n.Parent.DataAtom || atom.Td == n.Parent.DataAtom || atom.Th == n.Parent.DataAtom || strings.Contains(util.DomAttrValue(n.Parent, "class"), "inline"))
if parentInline && atom.Span == n.DataAtom &&
nil == n.Parent.PrevSibling && (nil == n.Parent.NextSibling || (html.TextNode == n.Parent.NextSibling.Type && "" == strings.TrimSpace(util.DomText(n.Parent.NextSibling)))) {
// 作为独立的公式块转换
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.

Loading

0 comments on commit 59a8c9c

Please sign in to comment.