Paste this JS code in the stack snippet editor:
(function() {
console.log(foo + "=>");
})();
Select it all with ctrl+A and use shift+tab to autoindent. The code becomes
(function() {
console.log(foo + "=>");
})();
It works properly when using the equivalent "=\>"
. This makes me wonder if the autoindent uses some naive regex in order to detect arrow functions, but one can't parse JS with regex.
Tidy
button doesn’t cause this problem.tab
(one would expect it to intend by a level), I guess preventing it from handlingshift+tab
is also an option