428 B
428 B
Preserve trailing whitespace in YAML block scalars (#19764 by @splincode)
Prettier now preserves trailing spaces, tabs, and whitespace-only lines when formatting literal and folded YAML block scalars.
await prettier.format("foo: |-\n value \n", { parser: "yaml" });
/* Prettier stable */
// -> "foo: |-\n value\n"
/* Prettier main */
// -> "foo: |-\n value \n"
// ^^ spaces preserved