0

If you have spaces at the end of code lines, then it doesn't indent properly ... sometimes.

The following has spaces at the end of the line, and doesn't indent properly

pagerange = 1..6
proxy = Net::HTTP::Proxy(proxy, port, user, pwd)
proxy.start('www.hirethings.co.nz') do |http|
  pagerange.each do |page|
    resp, data = http.get "/perth_dotnet?page=#{page}" 
    if resp.class == Net::HTTPOK
      (Hpricot(data)/"h3 a").each { |a| puts a.innerText }
    end
  end
end 

Whereas the following doesn't have spaces at the end of the line, and therefore indents properly.

pagerange = 1..6
proxy = Net::HTTP::Proxy(proxy, port, user, pwd)
proxy.start('www.hirethings.co.nz') do |http|
  pagerange.each do |page|
    resp, data = http.get "/perth_dotnet?page=#{page}"
    if resp.class == Net::HTTPOK
      (Hpricot(data)/"h3 a").each { |a| puts a.innerText }
    end
  end
end

Edit: Reproduction fail! Um, look at a Google cache for Options for HTML scraping?

2

1 Answer 1

0

If you are referring to very old posts remember that MarkdownSharp didn't exist then so there were old bugs possible.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .