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
attempt to fix attrs #394
base: main
Are you sure you want to change the base?
attempt to fix attrs #394
Conversation
@@ -10,15 +10,15 @@ assignees: "" | |||
A clear and concise description of what the bug is. | |||
If you're planning on posting a screenshot, please paste the accompanying code here. | |||
|
|||
**Screenshot** | |||
**Screenshot** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are these spaces coming from? Do you have prettier installed? Do I need to add some rules?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume prettier changed it. Not sure what rule it is though
@@ -109,7 +109,7 @@ | |||
}, | |||
{ | |||
"c": "div", | |||
"t": "source.js meta.var.expr.js string.quoted.double.ts", | |||
"t": "source.js meta.var.expr.js string.quoted.double.js.jsx", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come the extensions have changed to jsx.js here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's the part I'm trying to fix if possible. source.ts#expression
doesn't parse JSX so I added source.js.jsx
as one of the includes
. But that changed some of these scopes in unwanted places. Although if you open VSCode you don't really see the difference in colors.
So it's because the new rule you've created is matching existing lines and that's why it's changing irrelevant tests. Here is your rule put into regex101 and a component fixture added as the body. Is there a way we can update an existing rule without having a very similar one? Or we will need to change this rule so it doesn't affect existing lines. (make the regex more specific maybe). This may be a separate issue but using this as an example: We can see it leaks scopes here:
|
@@ -75,7 +75,7 @@ | |||
}, | |||
{ | |||
"contentName": "source.css.scss", | |||
"begin": "(?:}>|\\)\\))(`)", | |||
"begin": "(?:}>)(`)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(?:}>|\\)\\))(
)` was needed to catch multi-line rules.
here is an example
Although the fact you adjusted this I guess you was aware of that and thats why you made a new rule?
Another attempt at fixing #292
It kind of works with
attrs
but I need to see why it's changing so many irrelevant tests.