Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Converting short php tags

未關閉
#1,679 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
25/100
Issue 類型
缺陷
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
php
領域
tooling

研究方向

首先,使用外掛程式的 .prettierrc 設定作為組態點,重現 issue 中描述的短 PHP 標籤和縮排案例。閱讀外掛程式的組態和格式化文件,以確定是否支援這些行為。完成的標準是:所要求的標籤轉換和 PHP 縮排行為都有明確的規格,並得到一致的處理或文件說明。

由索引模型根據 Issue 內容生成。

描述

I find few code having shorted PHP tag <? ?> . Is there any way in the configuration if these tags get converted into whole long tag like <?php ?>? This is plugin has abrupt behavior for the shorter tags. Either blank ?> are appended to code since starting short tag is not parsed.

Second point whole the PHP code inside PHP tags remove the tab indent make it in the same line with PHP tag? Any configuration changes for that as well. THough tab-indent is enabled in .prettierrc.

主要語言
PHP
星號
1.9k
分支
139
PR 合併指標
30 天內沒有已合併 PR

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

prettier/plugin-php 的其他 Issue

查看 prettier/plugin-php 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。