Fix L24T-2.yaml (value of blockLiteral) bug in yaml-test-suite (#18331)

Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
Konv Suuandfisker authored and GitHub committed 2025-12-05 22:03:45 +08:00
1 parent 7dc8894993
commit a51ccb5779
7 files changed
+8186 -3

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
#### 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'
```