Shebang results in two newlines at the end of file
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Riproduci l’output nel Playground collegato usando @prettier/plugin-php v0.22.4, confrontando l’esempio con shebang con un file equivalente senza shebang. Segui il percorso del formatter che gestisce lo shebang e verifica che il file formattato termini con un solo newline finale anziché con due.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
@prettier/plugin-php v0.22.4
Playground link
Input:
#! /usr/bin/env php
<?php
$status = 0; exit($status);
Output:
#! /usr/bin/env php
<?php
$status = 0;
exit($status);
The Markdown render is not showing the newlines, so check the Playground.
Gut instinct is that it might be triggering the code path for inline code, but not sure, so letting you tag it if it is (not that I can even add labels). I'm mulling over how minor or petty this is, but I think the inconsistency between files with & without a shebang and how no other formatter for Prettier has a double newline at the end of a file is enough of a reason.
Feel free to shoot this down if you have a reason to do so. If for nothing else, someone might stumble across this issue and not feel like they are going crazy as to why they get double newlines at the end of the file. If you want someone to blame, it's Laravel's artisan stub they put into your repo that got me going.
- Lingua principale
- PHP
- Stelle
- 1.9k
- Fork
- 139
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di prettier/plugin-php
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
prettier/plugin-php#2416 · 2 commenti · 6 reazioni ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 64/100
prettier/plugin-php#2498 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
prettier/plugin-php#2495 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
prettier/plugin-php#2494 · 1 commento ·
-
strange format issue Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
prettier/plugin-php#2490 ·
Tutte le issue di prettier/plugin-php
Issue simili
-
jira-created
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
nunomaduro/phpinsights#745 ·
-
status/awaiting_triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
WordPress/plugin-check#1486 ·
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
az-digital/az_quickstart#6019 ·