atom-auto-indent
atom-auto-indent copied to clipboard
Opening braces within quoted string triggers indentation
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.
As a workaround for this I'm using "\x7B" to print "{" in PHP, but this makes the code difficult to read down the line.