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
(The first EOF has a tailing whitespace at the end the second one doesn't)
This script would create one file called hello.txt which has the following content:
Hello
EOF
cat << EOF > world.txt
World
The VSCode syntax highlighter ignores the trailing whitespace at the end of the EOF and marks it as a valid delimiter.
Such issues probably only occur in rare edge cases, but it would be nice if VSCode would mark the EOF as not valid, if it has a tailing whitespace, and also display this in the syntax highlighting. Or maybe even better, display a warning to the user that there is a trailing whitespace.
The text was updated successfully, but these errors were encountered:
Does this issue occur when all extensions are disabled?: Yes
Issue
You can, in bash, read an input stream until a specific delimiter is found. An easy example of this would be:
The problem with this is that bash only accepts this as a valid delimiter if it matches the pattern
^EOF$
.The problem now is that whitespace at the end marks the delimiter as invalid, which makes bash ignore it.
A script like this would, therefore, not be valid:
(Note the only difference here is that the last line is
EOF
instead ofEOF
)Finding such issues is hard, especially if you have another delimiter after this one, like for example:
(The first
EOF
has a tailing whitespace at the end the second one doesn't)This script would create one file called
hello.txt
which has the following content:The VSCode syntax highlighter ignores the trailing whitespace at the end of the
EOF
and marks it as a valid delimiter.Such issues probably only occur in rare edge cases, but it would be nice if VSCode would mark the
EOF
as not valid, if it has a tailing whitespace, and also display this in the syntax highlighting. Or maybe even better, display a warning to the user that there is a trailing whitespace.The text was updated successfully, but these errors were encountered: