Fix HTML block indentation drift in markdown list items (#19987)

Co-authored-by: fisker Cheung <lionkay@gmail.com>
This commit is contained in:
Lazizbek Ergashevandfisker Cheung authored and fisker committed 2026-09-16 15:44:38 +08:00
1 parent 0df4e49f14
commit 297117ab77
6 files changed
+157 -1

No files matched your search

@@ -0,0 +1,113 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`issue-19986.md - {"tabWidth":4} format 1`] = `
====================================options=====================================
parsers: ["markdown"]
tabWidth: 4
printWidth: 80 (default) |
=====================================input======================================
1. Enable images:
\`\`\`json
{}
\`\`\`
<p align="center">
<img alt="example">
</p>
2. Continue.
=====================================output=====================================
1. Enable images:
\`\`\`json
{}
\`\`\`
<p align="center">
<img alt="example">
</p>
2. Continue.
================================================================================
`;
exports[`issue-19986.md format 1`] = `
====================================options=====================================
parsers: ["markdown"]
printWidth: 80 (default) |
=====================================input======================================
1. Enable images:
\`\`\`json
{}
\`\`\`
<p align="center">
<img alt="example">
</p>
2. Continue.
=====================================output=====================================
1. Enable images:
\`\`\`json
{}
\`\`\`
<p align="center">
<img alt="example">
</p>
2. Continue.
================================================================================
`;
exports[`issue-19986-uneven-indent.md - {"tabWidth":4} format 1`] = `
====================================options=====================================
parsers: ["markdown"]
tabWidth: 4
printWidth: 80 (default) |
=====================================input======================================
1. Enable images:
<p align="center">
<img alt="example">
</p>
=====================================output=====================================
1. Enable images:
<p align="center">
<img alt="example">
</p>
================================================================================
`;
exports[`issue-19986-uneven-indent.md format 1`] = `
====================================options=====================================
parsers: ["markdown"]
printWidth: 80 (default) |
=====================================input======================================
1. Enable images:
<p align="center">
<img alt="example">
</p>
=====================================output=====================================
1. Enable images:
<p align="center">
<img alt="example">
</p>
================================================================================
`;
@@ -0,0 +1,2 @@
runFormatTest(import.meta, ["markdown"], { tabWidth: 4 });
runFormatTest(import.meta, ["markdown"]);
@@ -0,0 +1,5 @@
1. Enable images:
<p align="center">
<img alt="example">
</p>
@@ -0,0 +1,11 @@
1. Enable images:
```json
{}
```
<p align="center">
<img alt="example">
</p>
2. Continue.