microsoft / microsoft/vscode-containers
Syntax highlighting doesn't handle escaped quotes
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 139
- Forks
- 87
- Avg merge
- 9h 15m
- Merged PRs (30d)
- 9
Description
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:
I expect the entire sting literal "-w -s -X \"main.version=${VERSION}\"" to be yellow, apart from ${VERSION} which is correctly colored white.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The payload names no source file or test. Reproduce the Dockerfile ARG/RUN example in VS Code and compare its syntax coloring with the expected result; done means the escaped quotes remain within the yellow string literal while ${VERSION} keeps its existing coloring.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dockerfile, typescript, vscode
- Domain
- devtools, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100