Currently, there is no limit on the length of the contents of the cleaned markdown table columns. When we process tables which contain HTML, for example, all-contributors tables, the cleaned lines get very long:

In the case above, line is 865 characters long.
Let's detect such cases and turn off the table normalising, falling back to usual three-dash pattern, | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
Update.
Since we're using all-contributors spec tables as an example, we have to use a real-world markdown table for testing. I'm going to post the contributors table from one of my libraries here. Please don't consider this as a shameless plug, I first wanted to use all-contributors readme itself but later thought, technically, we should then mention its MIT copyright licence in Prettier's licence. Since I'm providing piece of my own library licence, licensing issues don't really apply.
Here is an original markdown example:
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
| [<img src="https://avatars1.githubusercontent.com/u/8344688?v=4" width="100px;"/><br /><sub><b>Roy Revelt</b></sub>](https://github.com/revelt)<br /> [💻](https://github.com/codsen/detergent/commits?author=revelt "Code") [📖](https://github.com/codsen/detergent/commits?author=revelt "Documentation") [⚠️](https://github.com/codsen/detergent/commits?author=revelt "Tests") | [<img src="https://avatars3.githubusercontent.com/u/1874682?v=4" width="100px;"/><br /><sub><b>Max Lapides</b></sub>](https://github.com/maxlapides)<br /> [🐛](https://github.com/codsen/detergent/issues?q=author%3Amaxlapides "Bug reports") | [<img src="https://avatars3.githubusercontent.com/u/9990521?v=4" width="100px;"/><br /><sub><b>Nacim Goura</b></sub>](https://github.com/nacimgoura)<br /> [🐛](https://github.com/codsen/detergent/issues?q=author%3Anacimgoura "Bug reports") | [<img src="https://avatars2.githubusercontent.com/u/23390212?v=4" width="100px;"/><br /><sub><b>Jack Steam</b></sub>](https://github.com/jacksteamdev)<br /> [🐛](https://github.com/codsen/detergent/issues?q=author%3Ajacksteamdev "Bug reports") |
| :---: | :---: | :---: | :---: |
<!-- ALL-CONTRIBUTORS-LIST:END -->
Here it is after being ran through Prettier:
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
| [<img src="https://avatars1.githubusercontent.com/u/8344688?v=4" width="100px;"/><br /><sub><b>Roy Revelt</b></sub>](https://github.com/revelt)<br /> [💻](https://github.com/codsen/detergent/commits?author=revelt "Code") [📖](https://github.com/codsen/detergent/commits?author=revelt "Documentation") [⚠️](https://github.com/codsen/detergent/commits?author=revelt "Tests") | [<img src="https://avatars3.githubusercontent.com/u/1874682?v=4" width="100px;"/><br /><sub><b>Max Lapides</b></sub>](https://github.com/maxlapides)<br /> [🐛](https://github.com/codsen/detergent/issues?q=author%3Amaxlapides "Bug reports") | [<img src="https://avatars3.githubusercontent.com/u/9990521?v=4" width="100px;"/><br /><sub><b>Nacim Goura</b></sub>](https://github.com/nacimgoura)<br /> [🐛](https://github.com/codsen/detergent/issues?q=author%3Anacimgoura "Bug reports") | [<img src="https://avatars2.githubusercontent.com/u/23390212?v=4" width="100px;"/><br /><sub><b>Jack Steam</b></sub>](https://github.com/jacksteamdev)<br /> [🐛](https://github.com/codsen/detergent/issues?q=author%3Ajacksteamdev "Bug reports") |
| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
<!-- ALL-CONTRIBUTORS-LIST:END -->
Imho, ideally, Prettier should leave such table as it is, with three-dash separators (:---:) instead of long lines. Feel free to do it differently.
Currently, there is no limit on the length of the contents of the cleaned markdown table columns. When we process tables which contain HTML, for example, all-contributors tables, the cleaned lines get very long:
In the case above, line is 865 characters long.
Let's detect such cases and turn off the table normalising, falling back to usual three-dash pattern,
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |Update.
Since we're using
all-contributorsspec tables as an example, we have to use a real-world markdown table for testing. I'm going to post the contributors table from one of my libraries here. Please don't consider this as a shameless plug, I first wanted to use all-contributors readme itself but later thought, technically, we should then mention its MIT copyright licence in Prettier's licence. Since I'm providing piece of my own library licence, licensing issues don't really apply.Here is an original markdown example:
Here it is after being ran through Prettier:
Imho, ideally, Prettier should leave such table as it is, with three-dash separators (
:---:) instead of long lines. Feel free to do it differently.