On 10 Nov 2017, at 11:49, Henrik Sperre Johansen <henrik.s.johansen@veloxit.no> wrote:
Can a line with a single ] ever at the "right" indentation level? Forcing autoformat at commit is a bit heavy hand, but maybe inserting a tab (or 2,3,4 spaces?) would be an ok workaround that doesn't require special decoding when loading the code?
The problem with inserting some whitespace is that you cannot know if you have to remove it (unless you insert whitespace everywhere, which was I believe Nicolas' proposal). Like I said, this is all rare and convoluted. But inside a multiline string constant you can have everything, right ? Foo>#myMethod "Return a help string" ^ 'This is for example help: Never use ] as the single character on a line!' I think the formatter is not good enough to do an auto reformat on every commit (especially for data driven, spec style code). Changing the formatting algorithm (which might be a personal preference) would change all source code.
Cheers, Henry
-- Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html