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
ARG VERSION
RUN go build -ldflags="-w -s -X \"main.version=${VERSION}\"" -o /server ./cmd/server
The backslashes around main.version= are needed to handle the case where ${VERSION} has spaces. However, VSCode sees the 2nd double quote (this one: \"main) as the end of the string literal. See the syntax coloring in the image:
I expect the entire sting literal "-w -s -X \"main.version=${VERSION}\"" to be yellow, apart from ${VERSION} which is correctly colored white.
The text was updated successfully, but these errors were encountered:
lionello
changed the title
Syntax highlighting ignores escaped chars
Syntax highlighting doesn't handle escaped quotes
Oct 18, 2023
For example,
The backslashes around
main.version=
are needed to handle the case where${VERSION}
has spaces. However, VSCode sees the 2nd double quote (this one:\"main
) as the end of the string literal. See the syntax coloring in the image:I expect the entire sting literal
"-w -s -X \"main.version=${VERSION}\""
to be yellow, apart from${VERSION}
which is correctly colored white.The text was updated successfully, but these errors were encountered: