Skip to content

Commit

Permalink
HtmlRenderer: don't nest <strong>
Browse files Browse the repository at this point in the history
  • Loading branch information
kivikakk committed Apr 1, 2023
1 parent f303e6b commit bbb49db
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/commonmarker/renderer/html_renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,12 @@ def emph(_)
out("<em>", :children, "</em>")
end

def strong(_)
out("<strong>", :children, "</strong>")
def strong(node)
if node.parent&.type == :strong
out(:children)
else
out("<strong>", :children, "</strong>")
end
end

def link(node)
Expand Down

0 comments on commit bbb49db

Please sign in to comment.