Closed kawanet closed 1 week ago
Hi! This looks like a duplicate of #65!
Hi! This was closed. Team: If this was fixed, please add phase/solved
. Otherwise, please add one of the no/*
labels.
Hi! Thanks for taking the time to contribute!
Because we treat issues as our backlog, we close duplicates to focus our work and not have to touch the same chunk of code for the same reason multiple times. This is also why we may mark something as duplicate that isn’t an exact duplicate but is closely related.
Thanks, — bb
Hi team! It seems this post is a duplicate, but hasn’t been marked as such. Please post a comment w/ Duplicate of #123
(no final .
) to do so. See GH docs for more info.
Thanks, — bb
Thank you for pointing me to the related issue.
My actual production app is to generate Markdown from mdast object without parsing Markdown.
I'll then try to update the app to add leading/trailing spaces around strong
nodes to avoid the needless escaping.
The commit 97fb818 might be able to give the new minor version number 2.2.0
with the breaking change, by the way.
foo***bar***buz
foo***bar***buz
😍 foo***bar***buz
😍 foo***bar***buz
😢 foo***bar***buz
😢 It depends on what you do, what I’d recommend. If you can generate spaces, I would indeed strongly recommend them.
Note that I do not consider escaping things a breaking change; that markdown still renders the same, and the HTML output is still the same. That wasn’t the case before. That escape is not needed in some cases. But it is needed in other cases. This patch fixes actual bugs!
Initial checklist
Affected packages and versions
mdast-util-to-markdown
Link to runnable example
No response
Steps to reproduce
Expected behavior
until mdast-util-to-markdown version 2.1.0, or commit df0d6a6, it works correctly.
toMarkdown(fromMarkdown(md))
runs the round trip from Markdown to Markdown.Actual behavior
since mdast-util-to-markdown version 2.1.1, or commit 97fb8181, it made characters escaped needlessly just before and after both
*
and**
.toMarkdown(fromMarkdown(md))
cannot run the round trip from Markdown to Markdown.toHtml(toHast(fromMarkdown(md)))
still has no trouble on the other hand.It means version 2.1.1 has a breaking change. Version 2.1.2 has the same issue. Thank you maintaining this anyway.
Affected runtime and version
node@22.11.0
Affected package manager and version
No response
Affected OS and version
No response
Build and bundle tools
No response