Small fix in audo-indentation.
This commit is contained in:
parent
37913f80a1
commit
e02afd9806
2 changed files with 2 additions and 2 deletions
|
|
@ -25,7 +25,7 @@ var Document = function(text, mode) {
|
|||
if (mode) {
|
||||
this.setMode(mode);
|
||||
}
|
||||
|
||||
|
||||
if (lang.isArray(text)) {
|
||||
this.$insertLines(0, text);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -423,7 +423,7 @@ var Editor = function(renderer, doc) {
|
|||
else
|
||||
break;
|
||||
console.log("Indent " + indent + "(" + line.length + ")");
|
||||
if (line.length != 0)
|
||||
if (/[^\s]$/.test(line))
|
||||
minIndent = Math.min(indent, minIndent);
|
||||
}
|
||||
console.log("min indent " + minIndent);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue