akalongman / akalongman/sublimetext-codeformatter
Space around control structure parantheses and single line opening & closing php tags
- 主要言語
- Python
- スター
- 772
- フォーク
- 128
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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.
コントリビューションガイド
評価
この issue はまだ評価されていません。