dprint / dprint-plugin-markdown

Markdown code formatting plugin for dprint.
MIT License
25 stars 9 forks source link

Formatting Breaks Valid Markdown #33

Closed Skillz4Killz closed 3 years ago

Skillz4Killz commented 3 years ago

Input/Output:

image

Expected:

A list should not be deleted

Link: https://github.com/Skillz4Killz/gamer-deno/pull/90/files#diff-b7549c2451f9754e3dbe9f08dbbb0863f5a7e1967ca8670d6ddefaaa08e07635R17

dsherret commented 3 years ago

Note that input is not a list—the dashes are not part of the markdown file and are GitHub showing the diff.

This is because of the wrapping behaviour configuration that deno fmt uses. Same thing happens in prettier with --prose-wrap: always:

https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAqA4gQwLZwE4AEAygA5yYDWAllAOapIA6UAkgQO6awEwQEBGcHgAshAN3wBPAXADOMAITMAMlQpCofaELgTCnWUqgAVPvMzToAGxpCATABYA9AHYCVWQWzS85KzzlFZlMvCAATfEx4ESFZfD1PDy9pMEwAVzijNnYqK38AKwgaAji8BIJMMDwIWU8YUQIrLjCAOmYAdSiwYRpaAgAzTEJmjioIhRAAGhAIEhgqaFlkUCHq9gAFIYQllEwrTkkl6f48SvUYUkre5Bg8NLhpuGxBMIiw5S5aNMxaOAAxCB4bBReZ0ZAgdK8KYgYQwbBWdo9eCyEiVOBEbZUeZiLGScFgWrQmilGDrU60YHIQZWOLTfKyAAeACFTmBzkQcHBVFA4FS9rSQPSGURelY4ABFNIQeB8mkPECovClcHAvAUMIQdhQaEkPA0GDtMb1ZAADgADNNdTU4O1TiRwXsDkcQABHKXwMmzHYQ2QAWh5cDe0N8bqovjJP0pSGpAri2CoNzu8tkool7t50f58pgmH4hrCxqQdmmt0wuV6AGEINgoyA5ABWaEZODGXM7GPysT3FhQCKwIhVKhzACCvaIMEkYtlcQAvjOgA

dsherret commented 3 years ago

Also related https://github.com/denoland/deno/issues/9191