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
I like this project, because I am looking to create a syntax tree out of markdown (in order to do my own JSX parsing). However, after running the example in the Readme, the syntax tree seems to have issues on even basic cases. For example, this is my node script:
# This is a h1 title
## This is a h2 subtitle
This is a paragraph 1.
This is a paragraph 2. **This text should be bold.** *And this text should be italic.*
> This should be a blockquote
1. Ordered list 1
2. Ordered list 2
3. Ordered list 3
- Unordered list 1
- Unordered list 2
And finally, after running the script, this was the full output:
[
{
"content": [
{
"content": "# This is a h1 title\n",
"type": "text"
},
{
"content": "#",
"type": "text"
},
{
"content": "# This is a h2 subtitle\nThis is a paragraph 1",
"type": "text"
},
{
"content": ".",
"type": "text"
}
],
"type": "paragraph"
},
{
"content": [
{
"content": "This is a paragraph 2",
"type": "text"
},
{
"content": ". ",
"type": "text"
},
{
"content": [
{
"content": "This text should be bold",
"type": "text"
},
{
"content": ".",
"type": "text"
}
],
"type": "strong"
},
{
"content": " ",
"type": "text"
},
{
"content": [
{
"content": "And this text should be italic",
"type": "text"
},
{
"content": ".",
"type": "text"
}
],
"type": "em"
}
],
"type": "paragraph"
},
{
"content": [
{
"content": [
{
"content": "This should be a blockquote",
"type": "text"
}
],
"type": "paragraph"
}
],
"type": "blockQuote"
},
{
"ordered": true,
"start": 1,
"items": [
[
{
"content": "Ordered list 1",
"type": "text"
}
],
[
{
"content": "Ordered list 2",
"type": "text"
}
],
[
{
"content": [
{
"content": "Ordered list 3",
"type": "text"
}
],
"type": "paragraph"
}
],
[
{
"content": "Unordered list 1",
"type": "text"
}
],
[
{
"content": "Unordered list 2",
"type": "text"
}
]
],
"type": "list"
}
]
Some things to highlight:
Headings are not picked up at all
Full stops get separated into their own blocks, even though they should have the same formatting like in the bold or italic test.
There is no separation between the ordered list and unordered list I created.
Is there an easy way to extend this work so it fixes the cases I mentioned above?
The text was updated successfully, but these errors were encountered:
Hello!
I like this project, because I am looking to create a syntax tree out of markdown (in order to do my own JSX parsing). However, after running the example in the Readme, the syntax tree seems to have issues on even basic cases. For example, this is my node script:
And this was my test.md file
And finally, after running the script, this was the full output:
Some things to highlight:
Is there an easy way to extend this work so it fixes the cases I mentioned above?
The text was updated successfully, but these errors were encountered: