akalongman / akalongman/sublimetext-codeformatter
Issue on blade template
- Dominant language
- Python
- Stars
- 772
- Forks
- 128
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
Thanks @RevanProdigalKnight for the great formater version.
I am using Laravel (.blade.php) files and I am getting an issue as the following:
```php
@foreach ($pages as $key => $page)
@if ($page->status_id == 2)
@endif
@endforeach
```
becomes
```php
@foreach ($pages as $key =>
$page)
@if ($page->
status_id == 2)
@endif
@endforeach
```
My config:
```js
"codeformatter_html_options":
{
"syntaxes": "html,blade,twig,asp,xml", // Syntax names which must process HTML formatter
"format_on_save": false, // Format on save. Either a boolean (true/false) or a string regexp tested on filename. Example : "^((?!.min.|vendor).)*$"
"formatter_version": "regexp", // Which formatter to use. Current options are "bs4" and "regexp". If an error occurs while loading the bs4 formatter, the regexp formatter will automatically be used
"indent_size": 4, // indentation size
"indent_char": " ", // Indentation character
"indent_with_tabs": false, // Indent with one tab (overrides indent_size and indent_char options)
"exception_on_tag_mismatch": true, // If the last closing tag is not at the same indentation level as the first opening tag, there's probably a tag mismatch in the file
"expand_javascript": false, // (Under construction) Expand JavaScript inside of tags (also affects CSS purely by coincidence)
"expand_tags": false, // Expand tag attributes onto new lines
"minimum_attribute_count": 2, // Minimum number of attributes needed before tag attributes are expanded to new lines
"first_attribute_on_new_line": false, // Put all attributes on separate lines from the tag (only uses 1 indentation unit as opposed to lining all attributes up with the first)
"reduce_empty_tags": true, // Put closing tags on same line as opening tag if there is no content between them
"reduce_whole_word_tags": true, // Put closing tags on same line as opening tag if there is whole word between them
"custom_singletons": "" // Custom singleton tags for various template languages outside of the HTML5 spec
},
```
Contributor guide
Assessment
This issue has not been assessed yet.