Simplified:
2.3.1 (main):0 > example = "<tr><td>some text in here</td></tr>"
=> "<tr><td>some text in here</td></tr>"
2.3.1 (main):0 > example_plus = "<tr><td>\nsome text in here\n</td></tr>"
=> "<tr><td>\nsome text in here\n</td></tr>"
2.3.1 (main):0 >
Nokogiri::HTML::DocumentFragment.parse(example).css("tr/td").text
=> "some text in here"
2.3.1 (main):0 >
Nokogiri::HTML::DocumentFragment.parse(example_plus).css("tr/td").text
=> "\nsome text in here\n"
2.3.1 (main):0 >
It doesn't appear to be a problem with newlines, but perhaps you
can gist a more complete test case?
--
Hassan Schroeder ------------------------
hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Consulting Availability : Silicon Valley or remote