Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add alternative indent check

  • Loading branch information...
commit e565177b77ba720831c2b20dd2a837fe56d719f4 1 parent 4e53a00
@chjj authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/lexer.js
View
6 lib/lexer.js
@@ -17,7 +17,7 @@ var lexer = function(str, options) {
, offset = 0
, tokens = []
, stack = []
- , indent = 0
+ , indent
, indents = []
, newline = true
, indentSize = getIndentSize(str);
@@ -43,6 +43,10 @@ var lexer = function(str, options) {
offset++;
if (ch > ' ' && newline) {
+ // wont work with indent option:
+ // if (!indentSize && indent != null && indent < buff.length) {
+ // indentSize = buff.length - indent;
+ // }
indent = buff.length;
// assert(indent % indentSize === 0);
while (indents[indents.length-1] >= indent) {
Please sign in to comment.
Something went wrong with that request. Please try again.