Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/html2markdown/converter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def parse_element(ele)

# wrap node with markdown
def wrap_node(node,contents=nil)
result = ''
result = ''.dup
contents.strip! unless contents==nil
# check if there is a custom parse exist
if respond_to? "parse_#{node.name}"
Expand Down
2 changes: 1 addition & 1 deletion lib/html2markdown/html_page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def initialize(options,&content_extrator)
@host = options[:host]
@url = options[:url]
if (@contents = options[:contents]) == nil
doc = Nokogiri::HTML(open(@url))
doc = Nokogiri::HTML(URI.open(@url))
@contents = doc.at_css('body').send(:inner_html) || doc.inner_html
end
@content_extrator = content_extrator
Expand Down