From: SourceForge.net <no...@so...> - 2012-06-07 21:23:45
|
Bugs item #3532720, was opened at 2012-06-07 03:35 Message generated for change (Comment added) made by kriegaex You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=113153&aid=3532720&group_id=13153 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Tidy functionality Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Alexander Kriegisch (kriegaex) Assigned to: Nobody/Anonymous (nobody) Summary: BR within PRE rendered with additional linefeeds Initial Comment: Sometimes in the wild there is HTML code with PRE sections containing BR tags instead of linefeeds, like so: <pre>first line<br>second line<br>third line</pre> JTidy's pretty-printer renders it like this ("break-before-br" is false): <pre> first line<br> second line<br> third line </pre> The result is that a browser renders two linefeeds where just one should exist, causing ugly empty lines in the output. The problem gets worse if for some reason I use multiple passes of JTidy, adding more and more linefeeds. How to fix: never ever add newlines after BR tags inside PRE sections. ---------------------------------------------------------------------- >Comment By: Alexander Kriegisch (kriegaex) Date: 2012-06-07 14:23 Message: I just uploaded my humble try to fix the problem. Maybe it is a bit hacky and not the optimal solution, sorry this was my first look into your code and I have not been programming for a while. But at least locally it solves my problem and might be potentially beneficiary for other users, too. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=113153&aid=3532720&group_id=13153 |