Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
styles = (doc/:body/:style) styles.each do |style| if style.inner_text.include?('BA2937') #find the correct inline css tag lines = style.inner_text.gsub(/\s/,'').split('}') #lines.delete_if {|line| line.to_s.include?('BA2937') == false} #lines.collect! {|line| line.gsub(/\{.*/,'').gsub(/^\#D/,'')} lines.each do |line| begin puts line.gsub(/\{.*/,'').gsub(/^\#D/,'').to_date rescue end end end end
This paste will be private.
From the Design Piracy series on my blog: