mirror of
https://github.com/sigmasternchen/sh.js
synced 2025-03-16 07:48:55 +00:00
line count now includes quoted lines
This commit is contained in:
parent
ee50ccdbc5
commit
97b4860961
1 changed files with 5 additions and 3 deletions
|
@ -237,7 +237,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return astRoot;
|
return [astRoot, line];
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseCommands(content) {
|
function parseCommands(content) {
|
||||||
|
@ -330,7 +330,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const end = findSymbolInScope(content, line, '"', i + 1, length);
|
const end = findSymbolInScope(content, line, '"', i + 1, length);
|
||||||
const ast = doubleQuoteToAst(content.substring(i + 1, end), line);
|
const [ast, _line] = doubleQuoteToAst(content.substring(i + 1, end), line);
|
||||||
|
line = _line;
|
||||||
|
|
||||||
value.add(ast);
|
value.add(ast);
|
||||||
|
|
||||||
|
@ -383,7 +384,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const end = findSymbolInScope(content, line, '"', i + 1, length);
|
const end = findSymbolInScope(content, line, '"', i + 1, length);
|
||||||
const ast = doubleQuoteToAst(content.substring(i + 1, end), line);
|
const [ast, _line] = doubleQuoteToAst(content.substring(i + 1, end), line);
|
||||||
|
line = _line;
|
||||||
|
|
||||||
value.add(ast);
|
value.add(ast);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue