-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Hey! Thanks for a great package!
The application I'm working on ran into this issue recently where if the href for a link contains non url encoded parens (()
), the ast node generated for the link doesn't contain the full href.
marked-ast
version: 0.3.0
Steps to reproduce:
- Invoke
MarkedAst._marked
like so —
MarkedAst._marked('[Some link](https://something.xyz/(12)/1)', {
// use renderer with altered methods for links and images
renderer: new MarkedAst.AstBuilder(),
// turn on Github-flavored MD goodies
gfm: true,
tables: true,
breaks: true,
smartypants: true,
sanitize: false
});
Expected ast:
[
{
"type": "paragraph",
"text": [
{
"type": "link",
"href": "https://something.xyz/(12)/1",
"title": null,
"text": [
"Some link"
]
}
]
}
]
Received/Actual:
[
{
"type": "paragraph",
"text": [
{
"type": "link",
"href": "https://something.xyz/(12",
"title": null,
"text": [
"Some link"
]
},
"/1)"
]
}
]
Any ideas on how we can resolve this?
Thanks in advance!
Metadata
Metadata
Assignees
Labels
No labels