-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Closed
Labels
grammarSyntax highlighting grammarSyntax highlighting grammarupstreamIssue identified as 'upstream' component related (exists outside of VS Code)Issue identified as 'upstream' component related (exists outside of VS Code)
Description
- VSCode Version: 1.47.1
- OS Version: Linux x64 5.3.0-62-generic snap (Ubuntu 18.04)
Steps to Reproduce:
- Paste the below code:
#!/bin/bash
cat <<SHELL > /path/file2
if [[ "$myvar" =~ ^(([0-9]|[1-9])\.)$ ]]; then
echo "test"
fi
SHELL
- Verify that the closing SHELL is highlighted as a string (not with the same color as the starting SHELL), and from there on till the end of the file (if there is more content), the highlight will consider the code as if it was inside the HEREDOC (even tough it isn't).
This does not happen if I remove \. from the regex (but this changes what it does):
#!/bin/bash
cat <<SHELL > /path/file2
if [[ "$myvar" =~ ^(([0-9]|[1-9]))$ ]]; then
echo "test"
fi
SHELL
This also doesn't happen if I wrap \. with brackets (it's the current workaround I'm using):
#!/bin/bash
cat <<SHELL > /path/file2
if [[ "$myvar" =~ ^(([0-9]|[1-9])(\.))$ ]]; then
echo "test"
fi
SHELL
Metadata
Metadata
Assignees
Labels
grammarSyntax highlighting grammarSyntax highlighting grammarupstreamIssue identified as 'upstream' component related (exists outside of VS Code)Issue identified as 'upstream' component related (exists outside of VS Code)