You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fd695f4
Browse filesBrowse the repository at this point in the historyBrowse files
fix(formatter_markdown): fix more mismatches found in ecosystem-ci repos (#27003)
- Stop CJK whitespace rules at inline node edges
- Keep a kept line break before a lone `|` row under `preserve`
- Escape a fake setext underline only when it ends its line
- Ignore backslash-escaped backticks when choosing a code span fence
<!-- prettier (the html becomes paragraph text) -->
204
+
> a
205
+
> <a>
206
+
> c
207
+
```
208
+
209
+
A complete type 7 tag on a lazy line opens an HTML block inside the container (micromark's rule, oxc-markdown-parser DIVERGENCES.md),
210
+
though no type 7 block can interrupt a paragraph on a regular line.
211
+
Printed with the container's prefix the line is no longer lazy, so a blank line keeps the block apart;
212
+
Prettier prints it adjacent, and the next parse reads it as part of the paragraph.
213
+
186
214
## list-marker-after-ignored-list
187
215
188
216
- Why: semantics
@@ -239,6 +267,9 @@ The parser opens one on any name-like fence line (`:::name[label]{attrs}`, `:::
239
267
240
268
Prettier has no directive construct (#19662 would add micromark's grammar only), so under `always` / `never` the fences are words of the paragraph and wrapping merges them into the text, which breaks the container for every dialect that reads it.
241
269
270
+
An opener interrupts a paragraph (as in micromark's directive extension and markdown-it-container),
271
+
so like any block it is printed after a blank line, under `preserve` too; Prettier keeps it on the paragraph's next line.
272
+
242
273
## line-shapes
243
274
244
275
- Why: semantics
@@ -263,6 +294,28 @@ a stray `:::`, or `[!` as the first line of a blockquote (GitHub / Obsidian aler
263
294
Prettier joins and wraps them like any word: the alert above loses its marker line (GitHub needs `[!NOTE]` alone on it),
264
295
a wrapped `<<<` line loses its `[title]`, and a component tag wrapped to column 0 opens an HTML block in MDX / VitePress.
0 commit comments