Bug 39085 - No space preserved incorrecly after END
Summary: No space preserved incorrecly after END
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 38664
Blocks:
  Show dependency treegraph
 
Reported: 2025-02-10 21:09 UTC by Jonathan Druart
Modified: 2025-02-10 21:09 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2025-02-10 21:09:44 UTC
The prettier plugin cannot guess if the absence of space was needed, so it got preserved. However in some cases it's not needed.

Eg.
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt
+                        [% END %]</li
+                    >

We could move the closing li on a separate line for better indentation and readability.

Also the closing title almost everywhere:
-[% END %]</title>

If we don't want spaces we need to CHOMP


List the candidates with `git grep -P 'END %][^\s|>|;|)|"|[]' **/*.tt`