Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117878 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 86910 invoked from network); 8 Jun 2022 16:29:58 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 8 Jun 2022 16:29:58 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 10AD01804D4 for ; Wed, 8 Jun 2022 11:16:01 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_40, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 8 Jun 2022 11:16:00 -0700 (PDT) Received: by mail-ej1-f47.google.com with SMTP id fu3so41546960ejc.7 for ; Wed, 08 Jun 2022 11:16:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=aYMWaqCwHyJQiScNbmbEooX3u6RYuZgGjI5HZJ99Jbw=; b=mXxE863OMzFCuslaGsQvadZ2Pa8tADUQ1OSjyLmSOTEyU261/eB5fzywKU5Z6nUAnY /sbwagANwTv3hhdjz2WUdqqUjC5g43f6aVUScnbgYft8cw9KmjzpjVOWsSnlkmeF/CZM RItCs5etwD4l08WbCOOkH5f6eRTKA/5z+rHkYAHw+FF4oszfUcVLx+pjtqwAN6Es4kq/ Kf+htJ5vpvf2pbxVBRXMHcqYor8V9mH7peD7FeraxVnS/r1+2aTjv2VHTruzujjc2xPE JG2JEwmvMIFo/TPYYvGBY+Ut/7IEllxnDwE6MuUZ4mODoFtTzArilKMhVo7S0HwbHel+ CwNQ== X-Gm-Message-State: AOAM533ho92vhBQowpJjnwrqu/iWndvHHExYeuJUckcWGvhL/hvrwmEn YM9bO23XERAoMmXTd6ZnL7eFrUkkL8BS8qq0 X-Google-Smtp-Source: ABdhPJz4ptaQAmEZUvWBPhX1lRr/FP4MAGoFC/XOMRJ9BjSDGAIMiI99B3qboGG+pEZEnXz6nu+KgA== X-Received: by 2002:a17:906:e2d2:b0:704:81fe:3152 with SMTP id gr18-20020a170906e2d200b0070481fe3152mr32496888ejb.411.1654712158994; Wed, 08 Jun 2022 11:15:58 -0700 (PDT) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com. [209.85.221.52]) by smtp.gmail.com with ESMTPSA id hz14-20020a1709072cee00b00708e906faecsm9173528ejc.124.2022.06.08.11.15.58 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Jun 2022 11:15:58 -0700 (PDT) Received: by mail-wr1-f52.google.com with SMTP id o8so1557621wro.3 for ; Wed, 08 Jun 2022 11:15:58 -0700 (PDT) X-Received: by 2002:adf:cc8f:0:b0:213:ba72:4ca with SMTP id p15-20020adfcc8f000000b00213ba7204camr29214398wrj.92.1654712157904; Wed, 08 Jun 2022 11:15:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 9 Jun 2022 03:15:46 +0900 X-Gmail-Original-Message-ID: Message-ID: To: Sara Golemon Cc: Robert Landers , internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Re: Adding new closing tag =?> for keeping trailing newline From: sji@sj-i.dev (shinji igarashi) > declare(ignore_newline_after_close_tag=3Dfalse); Thanks for coming up with another idea! As others have already pointed out, disabling the closing tag from eating trailing newline throughout the file would be inconvenient if we want to use control statements in the template. However, we currently only have one closing tag, but we already have two opening tags. So, for example, if we use declare to disable the newline eating only when closing a PHP block started with ` - I'm honestly not sure if adding a declare switch is better received than a new closing tag, though. Thanks! -- Shinji Igarashi 2022=E5=B9=B46=E6=9C=888=E6=97=A5(=E6=B0=B4) 12:34 Sara Golemon : > > On Tue, Jun 7, 2022 at 10:27 AM Robert Landers = 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 won= der if we can accommodate "non-html" scenarios in a broader (maybe more pal= atable?) way by assuming that if you want the newline to be respected on on= e line, you probably want it that way for the whole file. > > declare(ignore_newline_after_close_tag=3Dfalse); // 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