mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 12:20:40 -07:00
add identation value to token (#34)
* add identation value to token * fix lint problems * use var instead of let
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user