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

Parser wrong positions in attribute values that include mustache tags #6258

Closed
pushkine opened this issue Apr 29, 2021 · 2 comments · Fixed by #6542
Closed

Parser wrong positions in attribute values that include mustache tags #6258

pushkine opened this issue Apr 29, 2021 · 2 comments · Fixed by #6542
Labels

Comments

@pushkine
Copy link
Contributor

https://astexplorer.net/#/gist/7493c123a3c10eade136578aa9ebf4c8/6dc1f7f10625232aa5d214091bf3d6769b2e0558

<input foo=a{1} />
{
  "start": 11,
  "end": 13,
  "type": "Text",
  "raw": "a",
  "data": "a"
}      

Expected "end": 12

@pushkine pushkine changed the title Parser wrong Text node end position in unspaced attribute value Parser wrong positions in attribute values that include mustache tags May 4, 2021
@pushkine
Copy link
Contributor Author

pushkine commented May 4, 2021

Correction this happens on every attribute value that has mustache tags, so even style="color:{color};" has wrong end position for the first Text node

https://astexplorer.net/#/gist/09380864606687886956085fb0442755/e48a32b2ea9a2a3d3fb5116495c30d7c025d87ff

@Conduitry
Copy link
Member

The AST for this should be fixed in 3.40.0.

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

Successfully merging a pull request may close this issue.

2 participants