Back to Prettier

18331

changelog_unreleased/yaml/18331.md

3.9.0358 B
Original Source

Fix block value ends with whitespace (#18331 by @kovsu)

js
import { inspect } from "node:util";
import * as prettier from "prettier";

const input = "foo: |\n  x\n   ";
const output = await prettier.format(input, { parser: "yaml" });
console.log(inspect(output));

// Prettier stable
//-> 'foo: |\n  x\n\n'

// Prettier main
//-> 'foo: |\n  x\n'