Skip to content

Commit

Permalink
🎨 Improve Wikipedia clipping siyuan-note/siyuan#11640
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jun 4, 2024
1 parent 7ae25af commit fa2c3b4
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 49 deletions.
5 changes: 0 additions & 5 deletions h2m.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,6 @@ func (lute *Lute) genASTByDOM(n *html.Node, tree *parse.Tree) {
node.Tokens = bytes.ReplaceAll(node.Tokens, []byte("|"), []byte("\\|"))
}
}
if nil != tree.Context.Tip && tree.Context.Tip.IsBlock() && nil != n.Parent && atom.Span != n.Parent.DataAtom && 1 > len(lex.TrimWhitespace(node.Tokens)) {
// 块级节点下非 span 包裹需要忽略空白
// 剪藏时列表下方块缩进不正确 https://github.com/siyuan-note/siyuan/issues/6650
return
}

tree.Context.Tip.AppendChild(node)
case atom.P, atom.Div, atom.Section, atom.Dd:
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 fa2c3b4

Please sign in to comment.