Closed
Description
Initial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and couldn’t find anything (or linked relevant results below)
Affected packages and versions
mdast-util-to-markdown@2.1.1
Link to runnable example
No response
Steps to reproduce
the changes in mdast-util-to-markdown@2.1.1
cause unexpected escaping of normal characters, for example:
├─8 paragraph[3]
│ ├─0 strong[1]
│ │ └─0 link[3]
│ │ │ url: "https://www.example.com"
│ │ │ title: ""
│ │ ├─0 text "Curves on"
│ │ ├─1 emphasis[1]
│ │ │ └─0 text "the"
│ │ └─2 text " ipad. "
generates:
**[Curves on_the_ ipad. ](https://www.example.com)**
it used to generate:
**[Curves on_the_ ipad. ](https://www.example.com)**
another example:
├─2 paragraph[1]
│ └─0 emphasis[2]
│ ├─0 text "first"
│ └─1 strong[2]
│ ├─0 text "second"
│ └─1 emphasis[1]
│ └─0 link[1]
│ │ url: "about:blank"
│ │ title: "title"
│ └─0 text "important"
generates:
_first**second_[important](about:blank "title")_**_
before:
_first**second_[important](about:blank "title")_**_
Expected behavior
it should not escape characters that are not needed to be escaped.
Actual behavior
it escapes unexpected characters.
Affected runtime and version
node v20.18.0
Affected package manager and version
No response
Affected OS and version
No response
Build and bundle tools
No response