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
#!/bin/bash
declare -A a=();
a["[]"]=x;
b=${a["[]"]}; # this is incorrectly highlighted as part of a string
echo ${b}; # this too, it only ends after this double quote: " (this is highlighted as script)
It looks like:
It should look like:
Some notes about what the scopes are:
b=${a["[]"]};
b=${a scopes all appear to be ok [ Also seems to be ok
(didn't mean to close), nested brackets are still not correctly highlighted, and may never be since it requires pretty advanced recursive regex to be able to do it in Textmate
jeff-hykin
changed the title
Shell script syntax highlighting gets confused when using dictionary with square brackets in key name
Nested square brackets for dictionaries cause problems
Apr 16, 2024
The code with a problem is:
It looks like:
It should look like:
Some notes about what the scopes are:
b=${a
scopes all appear to be ok[
Also seems to be ok"[
I would expect the"
to start a string here]
this also should be part of a string"
Now a string is started, but really it should be endedOriginally from @SkyLined in microsoft/vscode#202566
The text was updated successfully, but these errors were encountered: