akalongman / akalongman/sublimetext-codeformatter

Space around control structure parantheses and single line opening & closing php tags

Abierto
#267 2 comentarios 1 reacción 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
772
Forks
128
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Hi,

First, thank you for the awesome utility, very handy and versatile.

I do have a couple of issues though:
1. The "SpaceAroundControlStructures" PHP pass has no effect inside the parantheses, is it possible to also apply it there? I couldn't find any other relevant options or passes, maybe I missed it?
e.g. "if(condition && condition2) {" => "if ( condition && condition2 ) {"
2. If i have opening and closing PHP tags on the same line, it adds a newlineafter the opening tag, but this is not desirable when inside an HTML block where I output pieces of code conditionally, e.g.

```php


Some content


Some conditional content


```

which gets transformed into:

```php


Some content


Some conditional content


```

How can I force it to keep everything on a single line?

Cheers!

Edit: Seems the second issue is due to the "SpaceAroundControlStructures" pass, perhaps I am gravely misunderstanding what these transforms mean, but space != newline.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.