-
Notifications
You must be signed in to change notification settings - Fork 425
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
Space missing when opening tag at end of a line #329
Comments
@yapper-git thank you for moving the bug here... This is certainly where it may receive attention! You might want to update your tidy output to show this problem still exists in current htacg tidy, current I called this a The problem is, in the current parsing, in certain circumstances, tidy But that said, does not mean it is not a bug. I, for one, agree 100% that all the browser tests I have tried on your sample shows a space between As stated, thanks for the report, and I, or others, will look into this soonest. But please update the output to reflect current tidy, and maybe remove the |
I updated the output above (with 5.1.25 version installed on ArchLinux). |
@yapper-git thanks for updating the sample... as promised will look at this soonest... OT: Just out of interest where did you get the tidy 5.1.25 version? |
@yapper-git thanks for the info. It is good to see your AUR packages really keeps up with Tidy release tags... thanks to @arthru - seems [s]he updated that almost the same date as I pushed that tag. I really wonder how to get my Ubuntu 14.04 LTS package updated? It still holds a 2009 release of tidy!!! YUCK! But that is OT here. I have started to look at this, but as suspected it becomes how to know to move a space, in this case a newline, to back before the There was another case of moving a space - yes in this sample That seems to be the same principal here, except it is a newline. And as I suspected, changing that sample space after the Just about out of time today, but I am on its tail ;=)) |
@yapper-git have pushed an experimental fix to the
As suspected, after the The fix is quite profound in that if it is a newline, and the mode is not IgnoreWhitespace, save this to the lexer - well actually it later gets changed into a space. Maybe this improves this case and does not break previous behaviour... still in testing... If you have the chance, please test... thanks... |
Have just been alerted to a possible problem with this fix... still to be fully tested... The case involves the
and the extreme case -
Any help with testing, comments, ideas... very welcome... |
As suspected the behaviour is quite different - using only default configuration... Input (input5\in_329-3.html)<textarea>1: line 1
line 2
</textarea>
<textarea>
2: line 1
line 2
</textarea>
and the extreme case -
<textarea>
3: line 1
line 2
</textarea> Current Tidy - Output<meta name="generator" content=
"HTML Tidy for HTML5 for Windows version 5.1.32">
<textarea>1: line 1
line 2</textarea>
<textarea>2: line 1
line 2</textarea>
and the extreme case -
<textarea>
3: line 1
line 2
</textarea> issue-329 Tidy - Output<meta name="generator" content=
"HTML Tidy for HTML5 for Windows version 5.1.34Exp">
<textarea>1: line 1
line 2</textarea>
<textarea>
2: line 1
line 2</textarea>
and the extreme case -
<textarea>
3: line 1
line 2
</textarea> This is a lot of difference! Now is it bad, or wrong, or better, perfect? It does seem to respect what the users wrote, but is that is what is needed? Sometime tidy concatinates, sometimes expands, like with wrapping... What is best? Seek comments on that... This fix works wonders on getting the following snippet correctly rendered as
But it does set back the schedule for merging this |
…into issue-329 Resolved conflicts: src/lexer.c version.txt
@yapper-git as explained above I have coded a simple fix for this, in lexer.c, but at present it has other consequences which must then be addressed as well...
This is an important bug, and must be fully fixed... and I must also clean up the However, we are currently considering a new release 5.2 shortly, and it is unlikely that I will get to fully fixing this before then, so am moving the milestone to 5.3... If you or others can look into this, then maybe it could still make it into 5.2... |
Sorry I never entered in tidy code and I have no time for that currently… |
@yapper-git eventually got around to pushing the above fix to I hope you, or others, can pull Maybe this can eventually be closed... thanks... |
This seems to have been fixed, so closing this issue... Please feel free to reopen, or post a new issue... thanks... |
I use Tidy in a project, but I got a bug.
Below is a minimal input code example.
The problem is that a line ends with
<strong>
, but the white space (here newline) is in the `\n'.All browsers displays a space between for and TidyTidyTidyTidyTidyTidyTidyTidyTidy (thanks to the newline).
While if you convert this HTML file with tidy (with default configuration).
Tidy outputs :
The whitespace disappeared...
The text was updated successfully, but these errors were encountered: