redhat-developer / redhat-developer/vscode-yaml

Typing enter after |> does incorrectly creates a new list entry

Open
#723 2 comments 0 reactions 1 assignee View on GitHub

@msivasubramaniaan is already working on this.

Since Mar 25, 2022.

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

Description

Describe the bug

Typing enter after > does incorrectly creates a new list entry.

Expected Behavior

Pressing enter after any of >, |. >- or |- should just add a single newline with a +1 indent level, because that is what multi-line strings are expecting.

Current Behavior

some-sequence:
  - foo
  - |

Now, go to last line and press enter, you will get

some-sequence:
  - foo
  - |
  - 

The expectation is that the user will enter a multi line string, so no - should be added, and only spaces indentation should be added.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.