smarttabs icon indicating copy to clipboard operation
smarttabs copied to clipboard

JavaScript: line continuations starting with `.` aren't lined up properly

Open strugee opened this issue 7 years ago • 0 comments

Given the following unindented code:

function foo() {
readableStream.pipe(throughStream)
.pipe(writableStream);
}

the correct indentation with smart-tabs-mode enabled is:

function foo() {
<tab>readableStream.pipe(throughStream)
<tab>              .pipe(writableStream);
}

i.e. the .s should line up. (This pattern is quite common in Node programs.)

However, smart-tabs-mode indents this as:

function foo() {
<tab>readableStream.pipe(throughStream)
<tab><tab>.pipe(writableStream);
}

Which is obviously incorrect.

strugee avatar Oct 26 '16 00:10 strugee