Skip to content

YAML keys are incorrectly wrapped with --prose-wrap always #10879

@thorn0

Description

@thorn0

Prettier 2.3.0
Playground link

--parser yaml
--print-width 20
--prose-wrap always

Input:

foo foo foo foo foo foo foo foo foo: bar

Output:

foo foo foo foo foo
foo foo foo foo: bar

Second Output:

SyntaxError: Implicit map keys need to be on a single line (1:1)
> 1 | foo foo foo foo foo
    | ^^^^^^^^^^^^^^^^^^^
> 2 | foo foo foo foo: bar
    | ^^^^^^^^^^^^^^^^
  3 |

Expected behavior:

? foo foo foo foo
  foo foo foo foo
  foo
: bar

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:yamlIssues affecting YAMLlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions