FIX: skip hidden nodes when converting from HTML to Markdown

This commit is contained in:
Régis Hanol
2017-05-03 19:34:03 +02:00
parent 09cb61b533
commit c8044c6956
2 changed files with 6 additions and 0 deletions

View File

@ -37,6 +37,8 @@ class HtmlToMarkdown
end
def visit(node)
return if node["style"] && node["style"][/display[[:space:]]*:[[:space:]]*none/]
if node.description&.block? && node.parent&.description&.block? && @stack[-1].markdown.size > 0
block = @stack[-1].dup
@markdown << format_block