Open dtdesign opened 1 year ago
There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.
There has been no activity on this issue for the past year.
Not quite true… there is an open PR for this issue for a half year (!) and nobody (except a bot) reviewed it …
📝 Provide detailed reproduction steps (if any)
.
to end the sentence and hit<Space>
to trigger theAutoLink
plugin.✔️ Expected result
The trailing dot should not be part of the implicitly created link.
❌ Actual result
The trailing dot is added at the end of the URL.
❓ Possible solution
The trailing space is already removed from the possible text in https://github.com/ckeditor/ckeditor5/blob/6d2257fbff2c34863243b9e5af4e42a8a251e84b/packages/ckeditor5-link/src/autolink.ts#L122. This could be extended to check if the last character of
url
contains a punctuation symbol and remove it from theurl
value.I thought about adding this to the regex, but it is already complex enough and it could possibly be faster to simply check the last character of
url
.📃 Other details
If you'd like to see this fixed sooner, add a 👍 reaction to this post.