Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting doesn't handle escaped quotes #4126

Open
lionello opened this issue Oct 18, 2023 · 2 comments
Open

Syntax highlighting doesn't handle escaped quotes #4126

lionello opened this issue Oct 18, 2023 · 2 comments

Comments

@lionello
Copy link

lionello commented Oct 18, 2023

For example,

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:
image

I expect the entire sting literal "-w -s -X \"main.version=${VERSION}\"" to be yellow, apart from ${VERSION} which is correctly colored white.

@lionello lionello changed the title Syntax highlighting ignores escaped chars Syntax highlighting doesn't handle escaped quotes Oct 18, 2023
@dbreshears dbreshears added this to the 1.28.0 milestone Oct 18, 2023
@bwateratmsft
Copy link
Collaborator

@rcjsuen can you take a look? Thanks!

@rcjsuen
Copy link
Contributor

rcjsuen commented Oct 19, 2023

I can indeed reproduce this. Not sure when I'll be able to get to it though.

@bwateratmsft bwateratmsft modified the milestones: 1.28.0, 1.29.0 Nov 7, 2023
@dbreshears dbreshears modified the milestones: 1.29.0, Future Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants