Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add offset against column&line in parser #107

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kodsurfer
Copy link

No description provided.

@@ -64,7 +64,7 @@ module.exports = class Parser {
let token = part.tokens[0]
let node = new Comment()
this.init(node, part)
node.source.end = { column: token[5], line: token[4] }
node.source.end = { offset: token[2] + token[1].length }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Core CSS parser generates offset together with line/column for backward compatibility
https://github.com/postcss/postcss/blob/main/lib/parser.js#L356-L363

I think we should do it here as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants