-
-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Labels
🐛 type/bugThis is a problemThis is a problem👶 semver/patchThis is a backwards-compatible fixThis is a backwards-compatible fix💪 phase/solvedPost is donePost is done🗄 area/interfaceThis affects the public interfaceThis affects the public interface
Description
Subject of the issue
`
-`
is stringified as:
`
- `
which changes the structure
Your environment
- OS: Ubuntu
- Packages: mdast-util-to-markdown 0.6.2
- Env: node v15.5.1, npm 7.3.0
Steps to reproduce
parse
`
-`
which has the structure
{
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode"
}
]
}
]
}
and stringify it:
`
- `
the resulting markdown has a different structure than the original
{
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text"
}
]
},
{
"type": "list",
"ordered": false,
"start": null,
"children": [
{
"type": "listItem",
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text"
}
]
}
]
}
]
}
]
}
📓 comparing how the two pieces of markdown text are being parsed with https://spec.commonmark.org/dingus it appears in both cases it is parsed as expected.
Expected behavior
structure is the same
Actual behavior
structure is different
Metadata
Metadata
Assignees
Labels
🐛 type/bugThis is a problemThis is a problem👶 semver/patchThis is a backwards-compatible fixThis is a backwards-compatible fix💪 phase/solvedPost is donePost is done🗄 area/interfaceThis affects the public interfaceThis affects the public interface