redhat-developer / redhat-developer/vscode-yaml

Indenting Compact Array of Mapping Breaks Yaml

Open
#1,128 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

upstream
Dominant language
TypeScript
Stars
829
Forks
260
Avg merge
5h 43m
Merged PRs (30d)
1

Description

Describe the bug

When selecting the yaml and indenting, the plugin produces broken yaml

Expected Behavior

Code is properly indented.

Current Behavior

Code is not properly indented and malformed.

Steps to Reproduce

Using:

children:
    - name: Items
      title: Items

Select text and hit tab.

Result:

    children:
        - name: Items
        title: Items

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in the VS Code YAML extension using the compact array-of-mapping example and the described selection-and-Tab action. No source file or test is named, so first locate the indentation handling entry point and its existing tests, then verify that the resulting YAML remains structurally valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.