Autolink should not include trailing punctuation #14497
Labels
domain:ui/ux
This issue reports a problem related to UI or UX.
intro
Good first ticket.
package:link
squad:core
Issue to be handled by the Core team.
type:bug
This issue reports a buggy (incorrect) behavior.
Milestone
📝 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
ckeditor5/packages/ckeditor5-link/src/autolink.ts
Line 122 in 6d2257f
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.
The text was updated successfully, but these errors were encountered: