`offset` is missing from `node.source`
Closed this issue · 4 comments
romainmenke commented
For example:
Line 141 in f880b77
While the default PostCSS parser for example has:
https://github.com/postcss/postcss/blob/77420d62919b4d53921a113bbc939ad5e5b49fe6/lib/parser.js#L361
getPosition(offset) {
let pos = this.input.fromOffset(offset)
return {
column: pos.col,
line: pos.line,
offset
}
}
offset
was likely added later in PostCSS and wasn't backported to this syntax.
This is not trivial to fix because the tokenizer also doesn't record the offset values in tokens.
I think this issue is fairly minor, but maybe someone is willing to volunteer their time :) (I don't use sugarss
myself)
ai commented
I will also fix sugarss
by adding offset
ai commented
The fix was released in 5.0.
romainmenke commented
Thank you @ai and @RamazanIttiev 🙇