-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Last closing round bracket is stripped out from the href #1459
Comments
The problem caused by the usage of this regex. |
If someone could explain me what is the purpose of this regexp, I'd fix the issue by myself |
The purpose of that is to prevent urls from including punctuation. e.g.
It is very difficult to determine what should be and what should not be part of a url.
Should |
The fix would be to wrap your urls with |
@UziTech Thanks, got it. But to be absolutely calm, why is it working at CommonMark? |
It's not working on your CommonMark Demo. If you view the html you will see that it doesn't set it as a link because autolinking is in the gfm spec not the commonmark spec. |
To be clear, this is actually a bug in marked because matched parenthesis should be part of the link but just changing the |
I'm seeing similar issues when we convert our changelog to HTML (we are using standard-version to genreate the changelog):
becomes
which renders visually as
which is missing the expected closing brackets, and should be rendered as:
It used to work several versions ago, but I think the issue was introduced in #1435 or #1414 |
@tmorehouse Your case is a little bit different since it is missing a parenthesis around the link not inside the link. I created PR #1509 to fix this |
Describe the bug
The last
)
is stripped out from thehref
when rendering HTML.It works fine on CommonMark.
To Reproduce
Steps to reproduce the behavior:
marked
receives the following content:testText https://test.test?_g=(refreshInterval:(display:Off,pause:!f,value:0),time:(from:'2015-10-11T11:08:59.548Z',mode:absolute,to:'2015-10-11T11:23:59.548Z'))&_a=(columns:!(URL),index:logs_web_error,interval:auto,,sort:!(TimeStamp,desc))
. Instead of having the anchor element with this whole link I get:The last
)
is lost from the href somehow.Expected behavior
Expected not to have the last
)
stripped from href.The text was updated successfully, but these errors were encountered: