Re: Re: Adding new closing tag =?> for keeping trailing newline
| From: | Sara Golemon | Date: | Wed, 08 Jun 2022 03:34:17 +0000 |
| Subject: | Re: Re: Adding new closing tag =?> for keeping trailing newline | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-117870@lists.php.net to get a copy of this message | ||
On Tue, Jun 7, 2022 at 10:27 AM Robert Landers <landers.robert@gmail.com>
wrote:
> FWIW, I think it makes a lot of sense, having used golang's template
> language (not everyone is generating HTML with PHP). I think you may
> just be dealing with a vocal minority and it would be worth putting to
> an actual vote. Even if it fails, we'll learn something the next time
> someone wants to change something like this.
>
While my gut response for the new end tag is in the "no" column, I do
wonder if we can accommodate "non-html" scenarios in a broader (maybe more
palatable?) way by assuming that if you want the newline to be respected on
one line, you probably want it that way for the whole file.
<?php
declare(ignore_newline_after_close_tag=false); // defaults to true, i.e
existing behavior
This would avoid any new syntax rules, but still provide the ability for
php-as-template-engine to behave in the user's preferred mode.
-Sara