James-LG / Skyscraper

Rust library for scraping HTML using XPath expressions
MIT License
31 stars 4 forks source link

Missing whitespace characters in text #26

Closed ArtemGolovko closed 7 months ago

ArtemGolovko commented 7 months ago

Whitespace character stripped from element text. Characters such as line feed and carriage return are missing in text.

Because of that, I can't use your library for my use case.

James-LG commented 7 months ago

The text methods were made to match browsers, but they ignore most whitespace which can be confusing.

I'll create/update methods to match lxml instead since that is a very popular XPath library that most users are probably already familiar with.