You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
This sort of thing has been covered before like in #246, and I don't know whether this can be improved, I think there is a tradeoff between preserving PHP scope info between blocks and having correct colorization in between them. So close this if it's not practical.
Copy and paste the code below. The brackets are with the wrong color
<?php if ($test) { ?>
<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Molestiae ipsam eius quos voluptate hic recusandae excepturi cum. Dolores vitae sunt optio assumenda soluta aliquam numquam voluptatum modi minima, labore illo.</p>
<?php } else { ?>
<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Molestiae ipsam eius quos voluptate hic recusandae excepturi cum. Dolores vitae sunt optio assumenda soluta aliquam numquam voluptatum modi minima, labore illo.</p>
<?php } ?>
As you can see it provides us just a generic source.php meta.embedded.line.phpthat we can't target. This is sort of bug because the second curly bracket (the opening one) have a different scope.
The text was updated successfully, but these errors were encountered:
@roblourens php is injected into html, so each php block has no context of one before.
We could add closing bracket in global context (in html.cson) and this will fix this exact problem.
Other issue #246 is about how injection are (not)working, and probably not worth trying to fix. If you're doing more than if/else in html files you probably need template engine anyway (or smth client-side like react).
#246 is only partially fixed in sense that html won't be eaten by php, but some things after <?php will be broken, since context is forgotten in 2nd block. Proper fix would allow html injections inside php injections. However with TM, then there would be the same problems as with sql. This is a bit sad tbh.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This sort of thing has been covered before like in #246, and I don't know whether this can be improved, I think there is a tradeoff between preserving PHP scope info between blocks and having correct colorization in between them. So close this if it's not practical.
Originally microsoft/vscode#74382
Copy and paste the code below. The brackets are with the wrong color
As you can see it provides us just a generic source.php
meta.embedded.line.phpthat
we can't target. This is sort of bug because the second curly bracket (the opening one) have a different scope.The text was updated successfully, but these errors were encountered: