mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Non-integer indentation levels are impossible.
This commit is contained in:
parent
6a03163fcb
commit
f100e7ab52
1 changed files with 1 additions and 1 deletions
|
@ -316,7 +316,7 @@ module.exports = class SpellView extends CocoView
|
||||||
|
|
||||||
xstart = startOfRow(row)
|
xstart = startOfRow(row)
|
||||||
if language is 'python'
|
if language is 'python'
|
||||||
requiredIndent = new RegExp '^' + new Array(xstart / 4 + 1).join('( |\t)') + '( |\t)+(\\S|\\s*$)'
|
requiredIndent = new RegExp '^' + new Array(Math.floor(xstart / 4 + 1)).join('( |\t)') + '( |\t)+(\\S|\\s*$)'
|
||||||
for crow in [docRange.start.row+1..docRange.end.row]
|
for crow in [docRange.start.row+1..docRange.end.row]
|
||||||
unless requiredIndent.test lines[crow]
|
unless requiredIndent.test lines[crow]
|
||||||
docRange.end.row = crow - 1
|
docRange.end.row = crow - 1
|
||||||
|
|
Loading…
Reference in a new issue