-
Notifications
You must be signed in to change notification settings - Fork 0
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
[PHP] Fix string interpolations #8
[PHP] Fix string interpolations #8
Conversation
Context name "tag" seems a bit strange for `<% ... %>`. Thus changing it to `php-embedded`. For string interpolation `php-interpolations` is used. Note: JSP and Rails will follow.
- match: (\?>)(\s*\n)? | ||
captures: | ||
1: punctuation.section.embedded.end.php | ||
2: meta.html-newline-after-php.php |
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 missed that this match was removed, too, as I thought it was only done for JS and CSS. The scope is needed for indentation rules and causes the indentation tests to fail.
I can reintroduce it tomorrow if you don't beat me to it. 😉
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.
Wasn't aware about it being used for indentation. Is that something to consider for the other syntaxes, too, then?
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'm not sure. I barely spent time on this, but I'm sure just asking @keith-hall would be quicker. 😉
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.
Wasn't aware about it being used for indentation. Is that something to consider for the other syntaxes, too, then?
Yep, though maybe we should tweak the scope a bit to standardize it in a more general form. It's also a good time to add indentation tests for other syntaxes :)
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.
At least, I've learned why I missed those tests (sublimehq/sublime_text#4113).
It appears PHP's sophisticated indentation rules may be used for other syntaxes as well. Ruby on Rails seems to be a candidate, maybe JSP as well.
Yes, indentation tests are useful, but I often failed to implement them due to ST's limitations, which prevent proper indentation in many situations anyway.
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.
No description provided.