Markdowner: html doc might have no body
In the case of some bogus markdown, like just "<script>..." text
This commit is contained in:
parent
d42685f4e2
commit
1f5d2d4587
|
@ -27,7 +27,11 @@ class Markdowner
|
|||
h[:rel] = "nofollow" unless (URI.parse(h[:href]).host.nil? rescue false)
|
||||
end
|
||||
|
||||
ng.at_css("body").inner_html
|
||||
if ng.at_css("body")
|
||||
ng.at_css("body").inner_html
|
||||
else
|
||||
""
|
||||
end
|
||||
end
|
||||
|
||||
def self.walk_text_nodes(node, &block)
|
||||
|
|
Loading…
Reference in New Issue