Cap ordered list mark at 999,999,999 (#19351)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
5 files changed
+111
-2
No files matched your search
@@ -0,0 +1,32 @@
|
||||
#### Cap ordered list mark at 999,999,999 (#19351 by @tats-u)
|
||||
|
||||
CommonMark parsers only support ordered list item numbers up to 999,999,999.
|
||||
|
||||
With this change, Prettier now caps the ordered list item number at 999,999,999 to ensure that the output is correctly parsed as an ordered list by CommonMark parsers. Numbers larger than 999,999,999 are not parsed as list item numbers and are left unchanged in the output:
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```markdown
|
||||
<!-- Input -->
|
||||
999999998. text
|
||||
999999998. text
|
||||
999999998. text
|
||||
999999998. text
|
||||
|
||||
1234567890123456789012) text
|
||||
|
||||
<!-- Prettier stable -->
|
||||
999999998. text
|
||||
999999999. text
|
||||
1000000000. text
|
||||
1000000001. text
|
||||
|
||||
1234567890123456789012) text
|
||||
|
||||
<!-- Prettier main -->
|
||||
999999998. text
|
||||
999999999. text
|
||||
999999999. text
|
||||
999999999. text
|
||||
|
||||
1234567890123456789012) text
|
||||
```
|
||||
Reference in new issue
Block a user