jorgemanrubia / truncato

A tool for truncating HTML strings efficiently
MIT License
59 stars 17 forks source link

Bundler update and falling test added. #2

Closed skyeagle closed 11 years ago

skyeagle commented 11 years ago

I have tried to use this wonderful gem with no success. I could not truncate string with siblings html tags. I've added falling test. Could you look on that, please? Thank you.

jorgemanrubia commented 11 years ago

Thanks a lot for reporting it and for the failing test @skyeagle. I will look into it this weekend.

jorgemanrubia commented 11 years ago

I just pushed a fix for this. The cause was that an XML document must have a single root to be valid, so nokogiri was only parsing the first node of the provided XML/HTML. I included a workaround so that it supports markup with no single root. Thank you for the reporting this problem and for the failing test.

skyeagle commented 11 years ago

Very well! Thank you.