fix js parser

This commit is contained in:
j 2012-05-22 19:50:26 +02:00
parent 6fcca8f3a9
commit 57f774ae8d

View file

@ -122,10 +122,8 @@ Ox.doc = (function() {
var lines = decodeLinebreaks(str).split('\n'), var lines = decodeLinebreaks(str).split('\n'),
indent = getIndent(lines[1]); indent = getIndent(lines[1]);
return { return {
statement: Ox.filter(lines, function(line, i) { statement: lines.slice(1, -1).map(function(line, i) {
return i && i < lines.length - 1; return line.slice(indent);
}).map(lines, function(line, i) {
return line.substr(indent);
}).join('\n') }).join('\n')
}; };
} }