Syntax highlighting is one thing. The double quotes another.
Each editor has its own dis-/advantages in this manner.
See my question on SoftwareRecs and its respective answers, most importantly this for both CLI and GUI and this for GUI.
Notably, Visual Studio Code, has IMHO the best Syntax highlighting from GUI editors.
From CLI editors, refer to the answer of gVim, which does the same syntax highlighting job for CLI.
Note that as I was a heavy nano user, I can tell you nano can't distinguish the variables inside quotes.
Finally, what should trouble you most is that you did not use - I suppose you're not used to it - bad habit - the double quotes. Please refer to StackOverflow for more information or simply use google.
PS: Always pipe your scripts to ShellCheck ;)