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

[PHP] Fix string interpolations #8

Merged
merged 2 commits into from
Apr 27, 2021

Conversation

deathaxe
Copy link

No description provided.

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.
@FichteFoll FichteFoll merged commit ec6d519 into FichteForks:pr/php/change-base-scope Apr 27, 2021
- match: (\?>)(\s*\n)?
captures:
1: punctuation.section.embedded.end.php
2: meta.html-newline-after-php.php
Copy link
Member

@FichteFoll FichteFoll Apr 27, 2021

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. 😉

Copy link
Author

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?

Copy link
Member

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. 😉

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 :)

Copy link
Author

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.

Copy link
Member

@FichteFoll FichteFoll Apr 28, 2021

Choose a reason for hiding this comment

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

Addressed in c1b69b4 and 71c32a3.

@deathaxe deathaxe deleted the review/php branch May 2, 2021 09:38
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.

3 participants