smarty 'code style' settings for }else{ how to set the indent level?
when i am writing in .php files and do a code reformat it reformats like this:
if($something){
print 'yes';
}else{
print 'no';
}
The }else{ statement is inline with the if. As it should be in my opinion.
But in smarty template files it gets reformatted like this:
{if $something}
yes
{else}
no
{/if}
With the {else} inline with the internals. Im wanting to format it:
{if $something}
yes
{else}
no
}
Just like php would do it. how can i get this setup?
请先登录再写评论。
I think it's just a formatting bug, please submit a ticket at http://youtrack.jetbrains.com
Thanks Rustam,
I have created a ticket here:
http://youtrack.jetbrains.com/issue/WI-10953
While the referenced ticket seems to be saying it's fixed, it's still happening in my IntelliJ 2020.1.1. Found this issue because I'm looking for Smarty formatting help.
Timothy Binder, it doesn't seem to be reproducible, as you can see, if and else stay aligned: https://recordit.co/IxYLscfycm
Eugene Morozov. I left a comment on the ticket saying the problem was with our template code and not the IDE. I missed posting that update here. Sorry about that. Thanks for following up.