Comments (17)
@Ingramz So should i'm push commit to fix this one? Cos there is no seems any activity on repository fix in mate
from language-php.
@Ingramz Okay then once @50Wliu merge things, i'm clean file, and then update this one
from language-php.
@zr9 did you sent a PR? having the same issue here.
Thanks
from language-php.
Confirm on that, it's a bit annoying
from language-php.
This is also happening when there is comment block syntax (/*
and */
) inside heredocs.
The file in my screenshot is part of the Symfony SensioDistributionBundle, available here.
from language-php.
yep. I see it too.
from language-php.
Likewise for single quotes ('
) or double quotes ("
) within a heredoc
from language-php.
There is 2 problems in atom/core probably.
Because grammar ignore "repository" and "injection" rules.
Good news so i'm can fix it by rewriting without that rules, here is simple trial example
But i'm need someone to help me write bug about grammar(En is not my native, so i'm sometimes unclear as hell).
And as well i'm need someone who can explain tricky parts in itself heredoc syntax,
like scope "string.unquoted.heredoc.php" now contain in rule double quote
and scope "string.unquoted.heredoc.nowdoc.php" now contain single quote
so i'm need to know diff and probably some examples of different languages(Js,SQL,Json,Regex,CSS) heredoc to test
from language-php.
@zr9 we've already concluded that it would be worthwhile fixing the root cause of this problem in first-mate package (see related discussion), so that all other bugs would fix on their own. The current solution is rather elegant (although, not working).
But it's still nice seeing someone giving their go at it.
from language-php.
@Ingramz Oh i'm not read references, so core bug already submitted. Then np :) But current solution is seems like working, so it can be fine as temporally fix until atom fixed "repository"
from language-php.
@zr9 sure, that's something people have suggested before.
You can compare your solution to the one in the pull request I submitted above. The changes got undone with later commits, but if you keep track of the commits throughout the pull request, you can sort-of see what was done there.
from language-php.
@Ingramz Yup almost similar, difference in "interpolation" since injection rule is not work, so interpolation need to get moved inside "heredoc_interior" after that it get fully working in current state, because at first heredoc get covered by main rules, then interpolated by php rules inside. Look on screen i'm posted above, or i'm can attach code if you wish so. So technically in current state full fix possible, and it even will be not dirty, only dirty thing is "interpolation" repeat. And more when repository will be fixed in core, it continue to work, so not get broken.
from language-php.
@Ingramz Tested, looks totally fine, here is screenshots.
Except of color issues, but that is atom/core other bug(or not bug).
Scopes for brief look fine too.
from language-php.
@zr9 sure, you can do it.
from language-php.
@diego-vieira Not yet, have a lot less time now, so slowdown a much, but still have plans to sent PR, or you can do so if you wish to.
from language-php.
I can confirm problem still occur.
from language-php.
Fixed by #184.
from language-php.
Related Issues (20)
- PHP 8.1
- Function name after newline not classified correctly HOT 1
- Tokenisation of psalm array types HOT 19
- i am unable to download packages that will me code php on atom editor. please i need help.
- Colour formatting gets confused due in specific situations with comment lines and another string containing lots of commas HOT 1
- after this line the rest of the text/code is not formated
- problem with ( in qoutes HOT 7
- Can't install the latest package version 0.48 HOT 1
- Is this still maintained? HOT 4
- When SQL used within a PHP string, interpolated PHP variables remain unstyled
- Support enum keyword HOT 1
- PHP syntax highlighting does not correctly detect end of string HOT 1
- Interpolation brace style HOT 5
- Curly braces inside HTML inside HEREDOC are marked red
- PHP 8.2
- SQL syntax highlighting with leading line break
- DATE_RFC7231 constant missing HOT 1
- filter_var() Constant missing HOT 1
- php doc types not highlighted HOT 1
- Fork
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from language-php.