Skip to content

Commit

Permalink
🎨 Improve HTML formula clipping siyuan-note/siyuan#11852
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jul 1, 2024
1 parent 7c88c9b commit e06da47
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 @@ -991,7 +991,7 @@ func (lute *Lute) genASTByDOM(n *html.Node, tree *parse.Tree) {

// The browser extension supports Zhihu formula https://github.com/siyuan-note/siyuan/issues/5599
if tex := strings.TrimSpace(util.DomAttrValue(n, "data-tex")); "" != tex {
if strings.HasSuffix(strings.TrimSpace(tex), "\\\\") {
if strings.HasSuffix(strings.TrimSpace(tex), "\\\\") || strings.Contains(tex, "\n") {
appendMathBlock(tree, tex)
} else {
appendInlineMath(tree, tex)
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.

1 change: 1 addition & 0 deletions test/h2m_test.go

Large diffs are not rendered by default.

0 comments on commit e06da47

Please sign in to comment.