jesseditson/jss — pull request #7 by kakt00c (2013-02-05 11:27:58+00:00)
Title: Update lib/jss/section.js

Next is wrong:
var indent = value.match(/^\s*/).length;
-- it will always returns 1;

so, for get count of space symbols at the beginning of the row,
it should be better to replace it with
var indent = value.match(/^\s*/)[0].length;

Next is also wrong:
if(last_indent && indent > last_indent){

Algorithm should turn to this branch, if it is not first row and it is indented
I noticed that 0 value interpreted as true (because it exists) in rubi.
But nil will be interpreted as false.

As you know, JS has different behavior of 0 as a Boolean.
So, it should be better to replace that row with
if(typeof last_indent === 'number' && indent > last_indent){