Skip to content

Commit

Permalink
✨ KityMinder JSON 渲染器 #127
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jan 13, 2021
1 parent e44e6a4 commit c822686
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 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.

6 changes: 0 additions & 6 deletions render/kityminder_json_renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,6 @@ func (r *KityMinderJSONRenderer) renderHTML(node *ast.Node, entering bool) ast.W
}

func (r *KityMinderJSONRenderer) renderParagraph(node *ast.Node, entering bool) ast.WalkStatus {
if grandparent := node.Parent.Parent; nil != grandparent && ast.NodeList == grandparent.Type && grandparent.Tight { // List.ListItem.Paragraph
if node.Parent.FirstChild == node && node.Parent.LastChild == node { // ListItem 下面只有一个段落时不渲染该段落
return ast.WalkContinue
}
}

if entering {
r.openObj()
r.data(node)
Expand Down

0 comments on commit c822686

Please sign in to comment.