question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove empty lines from generated HTML document.

See original GitHub issue

Hi, 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:closed
  • Created 11 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

12reactions
danielfernandezcommented, Sep 28, 2015

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.

5reactions
H-Locommented, Jul 4, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found