redhat-developer / redhat-developer/vscode-yaml
Formatting removes leading special whitespace (U+2003)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 829
- Forks
- 260
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
Describe the bug
The formatter removes both leading and trailing special whitespace characters (e.g. U+2003).
Let's say you have a YAML file containing leading special whitespace (U+2003):
some_string: "a
b # this line starts with 2 spaces for indentation followed by an U+2003
\u2003c" # here's an explicit U+2003
Expected Behavior
I would like to keep all leading (and trailing) special whitespace characters.
Current Behavior
Applying the formatter yields:
some_string: "a
b # this line starts with 2 space for indentation; the U+2003 HAS BEEN REMOVED
\u2003c" # here still is an explicit U+2003
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
Start by running the formatter on the YAML example containing U+2003 and compare the output with the expected behavior described in the issue. Trace the formatter entry point used for YAML files; done means leading and trailing special whitespace is preserved while ordinary indentation and the explicit escape remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100