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

adjust parsing of directives to preserve line/column info #1789

Merged
merged 1 commit into from
Oct 20, 2018

Conversation

Conduitry
Copy link
Member

Fixes #1788. Instead of prefixing the directive value with spaces to put it at the index into the string that it is in the template (which obviously breaks line numbers in error messages), just use the portion of the template string itself up to the end of the directive value. This also means we don't have to maintain the directive's value in a string as we march over it - we're just looking for the end of the attribute so we can trim everything after that off so as to not upset Acorn.

@Rich-Harris Rich-Harris merged commit 9395573 into master Oct 20, 2018
@Rich-Harris Rich-Harris deleted the gh-1788 branch October 20, 2018 12:51
@Rich-Harris
Copy link
Member

way nicer

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.

Parsing exceptions from Acorn for directives not correctly mapped to row/column
2 participants