-
Notifications
You must be signed in to change notification settings - Fork 239
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
Does not cut links that end with non-latin symbols based on domain correctly #278
Comments
Hey @kibertoad, interesting issue. Seems like a regression to me that it includes the non-latin symbols, and it looks like it doesn't link it at all if not prefixed by http or www. I see the following behavior at the moment: link('http://www.example.org版权所有') // <a href="http://www.example.org版权所有">example.org版权所有</a>
link('www.example.org版权所有') // <a href="http://www.example.org版权所有">example.org版权所有</a>
link('example.org版权所有') // example.org版权所有 (no link generated) Do you think the correct behavior would be the following? link('http://www.example.org版权所有') // <a href="http://www.example.org">example.org</a>版权所有
link('www.example.org版权所有') // <a href="http://www.example.org">example.org</a>版权所有
link('example.org版权所有') // <a href="http://www.example.org">example.org</a>版权所有 |
Yes, that looks correct. Thank you for the quick response! |
Hi @gregjacobs. Do you have some time to take a look at this issue? |
I see in this test that such behaviour is expected. |
Once upon a time there was this issue reported in
remarkable
: jonschlinkert/remarkable#51Fix worked just fine up to Autolinker version 1.4.1.
On 1.4.2+ the non-latin part was once again included together with the latin domain in parsed url. Most likely this is related to #201 being merged.
My question is this: would you consider that a regression or breaking change from
autolinker
side? Or previous behaviour was wrong and current one is preferable?Commit with fix for ease of reference (illustrates what autolinker API is used, and what is expected outcome): jonschlinkert/remarkable@719d4c1
Newest version generates this:
-<p><a href="http://www.example.org版权所有">www.example.org版权所有</a></p>
The text was updated successfully, but these errors were encountered: