|
|
@ -194,7 +194,13 @@ StateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF |
|
|
|
first++; |
|
|
|
} |
|
|
|
|
|
|
|
queue[i] = this.src.slice(first, last); |
|
|
|
if (lineIndent > indent) { |
|
|
|
// partially expanding tabs in code blocks, e.g '\t\tfoobar'
|
|
|
|
// with indent=2 becomes ' \tfoobar'
|
|
|
|
queue[i] = new Array(lineIndent - indent + 1).join(' ') + this.src.slice(first, last); |
|
|
|
} else { |
|
|
|
queue[i] = this.src.slice(first, last); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return queue.join(''); |
|
|
|