You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the second case, the formatting is removed. In the third case, the formatted inline element is removed completely. This is surprising to me and the case of removing the inline element seems dangerous to me. I would have expected mdformat to not change this document.
I looked into the CommonMark specification (6.4 Images), which says that an image description can contain inline elements, but that they should be flattened to the plain text content of the elements when rendering to HTML.
This means that in the second case, some information is lost because the document could be rendered to an output format that supports styled image descriptions and in the third case, part of the text is lost.
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗
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).
Consider the following document:
mdformat
changes the document to this:In the second case, the formatting is removed. In the third case, the formatted inline element is removed completely. This is surprising to me and the case of removing the inline element seems dangerous to me. I would have expected
mdformat
to not change this document.I looked into the CommonMark specification (6.4 Images), which says that an image description can contain inline elements, but that they should be flattened to the plain text content of the elements when rendering to HTML.
This means that in the second case, some information is lost because the document could be rendered to an output format that supports styled image descriptions and in the third case, part of the text is lost.
My setup:
I ran
mdformat
without arguments:The text was updated successfully, but these errors were encountered: