executablebooks / mdformat

CommonMark compliant Markdown formatter
https://mdformat.rtfd.io
MIT License
416 stars 45 forks source link

--wrap removes unicode spaces #339

Closed nschloe closed 2 years ago

nschloe commented 2 years ago

Describe the bug

The following markdown as an [em space] between the two x:

em-space: x x

running

mdformat --wrap 100 a.md

on the file incorrectly transforms the em-space into a regular space. The problem does not occur without --wrap.

Reproduce the bug

If it helps,

open("b.md").read()

in IPython shows the string with Unicode characters escaped.

List your environment

welcome[bot] commented 2 years ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

hukkin commented 2 years ago

Thanks a lot for the issue!

https://github.com/executablebooks/mdformat/pull/341 should fix this. I plan to make a release in the upcoming days.

nschloe commented 2 years ago

Cool, thanks!