diff --git a/src/tokenizer.js b/src/tokenizer.js index 45eee19f1..cde44d1d4 100644 --- a/src/tokenizer.js +++ b/src/tokenizer.js @@ -36,6 +36,10 @@ function parse (html, filepath, options) { token.name = match[1] token.args = match[2] + // get last line indentation + var lineStart = (htmlFragment || '').split('\n') + token.indent = lineStart[lineStart.length - 1].length + tokens.push(token) } else { // output