Subject: | Enhancement request - Chomping newlines from tags with easier syntax |
My wish:
Chomping of newlines (before, after, both) from tags.
Template tags should not automatically generate newlines.
I hope i didnt misunderstood the use of chomp mode im HTC.
A global setting could be done with attributes like tagchomp,
tagchomppre and tagchomppost (or some other name for the attribute).
For example this could be set with:
$htc->new( tagchomp => 1); # global setting
Now lets step towards the problem within templates. I think three
different cases are existing in templating with newlines:
a) Remove all newlines from tags
----
<?IF Foo CHOMP=1?>
Booh!
<?/IF?>
.
----
Should generate:
----
Booh!
.
----
b) Remove previous newline
----
<?IF Foo CHOMPPRE=1?>
Booh!
<?/IF?>
.
----
Should generate:
----
Booh!
.
----
c) Remove follwoing newlines
----
<?IF Foo CHOMPPOST=1?>
Booh!
<?/IF?>
.
----
Should generate:
----
Booh!
.
----
The names of the chomp... parameter could be CHOMP, CHOMPPRE and
CHOMPPOST.
The current chomp method in HTC with syntax <+-%, <--% is so confusing,
ugly and breaks with the common starting tag delimiter <% and some
webeditors are very confused by <+- or even <-- syntax.
Thanks in advance for adding my wish in new HTC release.