-
Notifications
You must be signed in to change notification settings - Fork 82
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
Bug: Anchor HTML Tags Text Is Escaped by No Bare URLs
#588
Comments
This seems interesting. I am not sure what is going on here, but I need to check the regex and make sure it doesn't need any escaping in it. |
The following is what I got when I added the custom regex you provided as a custom regex replacement: Wycinek utworzono z: [https://www.tygodnikpowszechny.pl/zycie-pod-mikroskopem-151274](https://www.tygodnikpowszechny.pl/zycie-pod-mikroskopem-151274) This looks correct to me. @dbobak, could you provide your whole |
Yes, of course: |
I am able to reproduce. If I had to guess, you have No Bare URLs turned on which is not really good at figuring out when a link is in an anchor tag already. I will take a closer look and see if that rules is on and if turning it off will fix the issue. If so, I may need to think up a way around this issue. |
Yeah. It is a problem with |
I may have a fix for this. I just need to test it out and if it works. I will merge it in for next release. |
Looks like my fix works with your config. I will push it up and see how it goes. |
The fix for this should be on master and in the next release. Please let us know if that is not the case. |
No Bare URLs
@pjkaufman, I confirm that this is No Bare URLs problem. After turning off that option, the regex works as expected. If the new release will be published, I'll let know if the fix is working for me. Thanks! |
In Custeom Regex Replacement section I'm trying to convert HTML links to markdown links with that regex:
find:
<a.*?href=["']([^"']*)["'][^>]*>([^<]*)<\/a>
igm
[$2]($1)
Generally it works, but sometimes it fails, for example in this case:
the link is converted to:
When testing in https://regexr.com/, my regex works fine.
The text was updated successfully, but these errors were encountered: