-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should Indentation decrease on the same line as closing symbols if the line is not otherwise empty? #32
Comments
I notice that in your |
Thanks for this! As you point out, this is currently expected behaviour, and is the style which I personally prefer. Nonetheless I would be open to including an option to dedent after the closing bracket on non-empty lines, if this is desirable for some people. I do think however that adding extra line breaks is very likely to cause problems with correctness so would prefer to avoid this. |
Thanks for being open to the suggestion! I guess we can count this as a +1 from me for such an option, but I appreciate that it might not be worth your time until this is a more popular request. If I have some time I might tinker around and suggest an implementation at some point. Regarding adding line breaks, I agree that this is undesirable and it should be left to the user. |
Great, I probably won't be able to work on this immediately, so feel free to suggest an implementation if you'd like to! |
I am going to close this issue for now; feel free to reopen it if you have some ideas for an implementation, or if other people are also requesting this feature. |
I've noticed that indentation is decreased on the same line as a closing curly bracket, as in the following raw source:
\comment{This is a comment that the user has decided to write on different lines.}
gets indented as
\comment{This is a comment that the user has decided to write on different lines.}
I would expect it to also indent the last line that contains the closing bracket and give:
\comment{This is a comment that the user has decided to write on different lines.}
An alternative would be to instead to insert line breaks to obtain
\comment{ This is a comment that the user has decided to write on different lines. }
but the latter would be a different style choice than what the user might want (also potentially introduce errors by not having a
%
after the opening brace).PS. I just discovered this new formatter and I'm excited to give it a spin! I'll try to contribute test cases if I find any interesting ones.
The text was updated successfully, but these errors were encountered: