Prettier 3.6.0
Playground link
This behaviour was introduced in #16637
Input:
1. Some text, and code block below, with newline after code block
```yaml
---
foo: bar
```
1. Another
2. List
Output:
Newline after fenced code block is removed:
1. Some text, and code block below, with newline after code block
```yaml
---
foo: bar
```
1. Another
2. List
Expected output:
Newline after code block should not be removed (input should be untouched):
1. Some text, and code block below, with newline after code block
```yaml
---
foo: bar
```
1. Another
2. List
Why?
It is common to have a blank newline around fenced code blocks. This is also in conflict with MD031 for those using markdownlint.
Prettier 3.6.0
Playground link
This behaviour was introduced in #16637
Input:
Output:
Newline after fenced code block is removed:
Expected output:
Newline after code block should not be removed (input should be untouched):
Why?
It is common to have a blank newline around fenced code blocks. This is also in conflict with MD031 for those using markdownlint.