atom-auto-indent icon indicating copy to clipboard operation
atom-auto-indent copied to clipboard

Opening braces within quoted string triggers indentation

Open tjohnman opened this issue 9 years ago • 1 comments

If you have something like this in PHP code: $variable .= "stuff {\n "; atom-auto-indent will think we're actually opening a pair of braces and indent the lines following this one. This is obviously not intended. Interestingly enough, a few lines down I have something like this: $variable .= "}\n "; But this time the brace gets ignore and indentation never gets back to normal, thus the rest of the file ends up indented wrong.

tjohnman avatar Feb 05 '16 10:02 tjohnman

As a workaround for this I'm using "\x7B" to print "{" in PHP, but this makes the code difficult to read down the line.

tjohnman avatar Feb 05 '16 10:02 tjohnman