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 grammar is injected into itself #82

Open
Ingramz opened this issue Apr 18, 2018 · 0 comments
Open

PHP grammar is injected into itself #82

Ingramz opened this issue Apr 18, 2018 · 0 comments

Comments

@Ingramz
Copy link
Contributor

Ingramz commented Apr 18, 2018

An Atom user found an interesting bug: atom/language-php#326

Namely what is happening is that from the injection selector: ^text.html - (meta.embedded | meta.tag), L:^text.html meta.tag, L:text.html.php source.js the last two alternatives L:^text.html meta.tag and L:text.html.php source.js do not exclude the meta.embedded.block.php scope. This causes the PHP part of the grammar to be injected into itself in these two cases.

Here are all three cases to test with, from which the last two are currently misbehaving:

<?php /* <?php echo 'test'; ?> */ ?>

<script type="text/javascript">
  var str = "<?php /* <?php echo 'test'; ?> */ ?>";
</script>

<img style="<?php /* <?php echo 'test'; ?> */ ?>" />
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

No branches or pull requests

1 participant