Remove empty lines from generated HTML document.
See original GitHub issueHi, it could useful to have feature to remove empty lines from generated HTML document by Thymeleaf. Empty lines occurring after using th:remove
attribute. It could be made implicitly or one can turn this feature on in configuration. Motivation - sometimes size of generate document matters.
Issue Analytics
- State:
- Created 11 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
How to remove blank lines from HTML with HTMLAgilityPack?
c# - I have a HTML document that contains lots of needless blank lines which I'd like to remove. Here's a sample of...
Read more >Remove blank lines in div - Stack Overflow
Trim and filter out empty lines. // get the pre tag var pre = document. ... The HTML element represents preformatted text.
Read more >Remove blank lines from text file - UltraEdit
This will delete all lines in the file that contain no characters or whitespace. If text is selected, then the operation is restricted...
Read more >Remove All Empty Lines from Text - Online Text Tools
It can remove all completely blank lines (that contain nothing but a newline symbol), and it can also delete lines that contain whitespace...
Read more >How to Get Rid of Empty Lines of Code in Any Text Editor
Step-by-Step: How to Remove Blank Lines of Code Using a Text Editor · In the file you want to clean up, select two...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thymeleaf 3.0 now includes a Post-Processor API (see #400 and #401). A whitespace-collapsing utility looks like the perfect use case for a post-processor, provided by a custom dialect.
Will close this as declined, as I don’t think it should be a part of the core or the Standard Dialects.
Really sad decision. Perfect case would be that the engine does NOT create emply lines at all, and not that we have to write additional software to fix those bad practice of creating empty lines.