What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

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?

share|improve this question
    
Uh... none of the revisions look messed up to me stackoverflow.com/posts/3115/revisions –  Yi Jiang Aug 22 '10 at 8:27
    
@Yi Jiang: No they don't, but have you looked at the google cache version? –  Andrew Grimm Aug 22 '10 at 9:30

1 Answer 1

up vote 0 down vote accepted

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

share|improve this answer

You must log in to answer this question.

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