-
Notifications
You must be signed in to change notification settings - Fork 429
Trailing backspace removed #856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@petko thank you for your issue... But I do not understand quite, exactly, what you are asking... maybe I don't understand... explain... Part of Is there an option to preserve this space... in some xhtml cases, yes, to some extent... but otherwise NO... It is important that such spaces do not change the browser rendering of the paragraph... So one is forced to ask, why do you want this In testing, considering, have expanded your sample, to my in_856.html, to included other But maybe I do not understand your issue... please elaborate... thanks... |
I am migrating some texts, which are used in WYSIWYG text editor. In the old version of the software they are stored as RTF files and in the new - as HTML (after cleaning the produced files using HTMLTidy). Such texts sometimes contain leading or trailing whitespace, which are deliberately put there by the user. So when they are imported in the new software, they no longer are the same texts, they are missing that whitespace. |
@petko thanks for the further feedback... Ok, you changed the version of your text editor, but I still do not understand what you want All version of There is little chance of adding an option to prevent that... even if fully defined... More to the point, what would be the
Assume by Hmmm, as you point out, if it is replaced with Still do not understand your issue... please elaborate... thanks... |
My initial confusion comes from the fact that https://validator.w3.org with the Clean HTML option enabled does not remove these spaces. But probably they used an older/alternative version of Tidy HTML. As for I will just replace spaces with |
@petko, seems no actual issue for tidy identified... that I can see... and no new comments in over a year... So am closing this... Please add further feedback, if I am wrong... or open a new issue... thanks... |
Hello @geoffmcl !
Tidy used to prepare the valid XML for parsing. After tidy I get this:
Space in The question is: Probably it is still possible to somehow tell tidy to keep such spaces? Or may be you have some thoughts or workarounds? |
Why are trailing spaces like the following removed by TidyHtml?
The trailing space after text will be removed. If it is replaced with
it will be preserved.What config option determines that and is it possible to leave the spaces intact?
The text was updated successfully, but these errors were encountered: