Back to Prettier

19351

changelog_unreleased/markdown/19351.md

3.9.5805 B
Original Source

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