Closed JamesArthurHarrison closed 3 years ago
Any screenshots?
Does this issue related to #248 ?
Any screenshots? Apologies, my computer was on the struggle-bus in saving screenshots. Lets see if it will now (a few min pass)...success!:
Does this issue related to #248 ?
I initially thought so, but as the issue persists outside of Twig, and affects non-brackets I'm not certain. I've edited the issue title to reference JS & Twig documents now :-)
Ah, Are you using JQuery? I think it related to #41
I don't think there are many people still using JQuery, so I'm going to close this issue. If you really want to fix this, a donation would help.
I mean we work with a lot of legacy code & it's there. Additionally I've learnt to code as a trainee developer over this last year - I didn't realise jQuery wasn't used now. I had spoken to one of our Dev's who never used it - is this because JS has better functions for emulating the selections it does? Basically I'm interested in when/why jQuery stopped being in fashion/used. Being new to the scene I haven't lived through this stuff - and I'm not sure If I'm being judged/mocked for working with code that uses it...I just learned it when I learned JS and the course teaching it didn't mention it was bad or obsolete! Or is there just something that replaces it now, that most people know about. Thanks!
Apologies - I have no idea how much of a donation would help, being a trainee dev for a charity I don't have any experience on how much an issue like this would cost to fix.
Separately from all the ignorance, Rainbow brackets has been my favorite plugin! genuinely helps me read code far better than anything else :100:
Oh, sorry, I didn't mean JQuery is bad and didn't judge you. We all have to maintain some legacy code at some time(I do use JQuery when I'm still a student).
So, I would have a try to fix it and I'm happy this plugin can help someone.
For
$("#test")
The PSI tree is:
JSFile:Dummy.js(0,10)
JSExpressionStatement(0,10)
JSCallExpression(0,10)
JSReferenceExpression(0,1)
PsiElement(JS:IDENTIFIER)('$')(0,1)
JSArgumentList(1,10)
PsiElement(JS:LPAR)('(')(1,2)
JSLiteralExpression(2,9)
PsiElement(JS:STRING_LITERAL)('"#test"')(2,9)
PsiElement(JS:RPAR)(')')(9,10)
The fix:
Open "Do not rainbowify brackets without content"
If you have any other questions, please leave a comment, I will reopen this issue.
Thank you so much! sorry it took me so long to reply - I really appreciated that you looked into this further for me :-)! Still the best plugin :-)
Please check
Your programming language(s)
JS
Expected Behavior
Current Behavior
Possible Solution
I initially thought this was an interaction with twig, but the issue persists in a .js document. It feels like it might be related to the ~, because without that it reverts to normal quotes. I do not know how to resolve it
Code snippet for reproduce (for bugs)
Your Environment
P.S. First proper issue I've reported outside of work :-)