redhat-developer / redhat-developer/vscode-yaml
Single dot shows as a float while it's a string
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 829
- Forks
- 260
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
Describe the bug
When a single dot is a value in key/value map, it is shown as a float while YAML parses it as a string
Expected Behavior
The dot has highlight as a string
Current Behavior
The dot has highlight as a float
Steps to Reproduce
paths:
etc: /etc
pwd: .
number: 3
up: ./..
. should be highlighted as a string, not as a number. Because YAML will parse it as a string. This parsed as a JSON is:
{
"paths": {
"etc": "/etc",
"pwd": ".",
"number": 3,
"up": "./.."
}
}
Environment
- Windows
- Mac
- Linux
- other (please specify)
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
Reproduce the issue in VS Code with the YAML snippet from the report and inspect how syntax highlighting classifies the single dot. Trace the relevant YAML highlighting entry point, then verify that . is highlighted as a string while 3 remains a number and ./.. remains a string.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100