Skip to content
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

Link text at end should have link trimmed with space appended #196

Open
yellis opened this issue Jul 17, 2022 · 1 comment
Open

Link text at end should have link trimmed with space appended #196

yellis opened this issue Jul 17, 2022 · 1 comment
Labels
enhancement New feature or request mode - markdown Affects the editor's markdown input mode mode - rich text Affects the editor's rich text (wysiwyg) mode
Milestone

Comments

@yellis
Copy link
Contributor

yellis commented Jul 17, 2022

Describe the bug
In both modes, if you select text that ends in a space and make a link (ctrl-L), the link will include the space. Friendlier is the way that it works in the current editor: if the link text ends with a space, the space is trimmed from the link and appended after the link. Especially pertinent as double clicking a word that has a space after it will normally include the space in the highlighted text.

Applies to any marks, including bold, italics, etc

To Reproduce

  1. Either mode, type in a sentence, double-click a word in the middle of the sentence
  2. Ctrl-L to add a link
  3. Observe: the link includes the space following the word

Expected behavior
Link will only be the word, with space included (but not linked) after

Screenshots
demo

Desktop (please complete the following information):
Windows 11 Chrome 103

Additional context
https://meta.stackexchange.com/a/380335/51

@yellis yellis added bug Something isn't working mode - markdown Affects the editor's markdown input mode mode - rich text Affects the editor's rich text (wysiwyg) mode labels Jul 17, 2022
@yellis yellis added this to the Beta 2 alt milestone Jul 18, 2022
@b-kelly b-kelly added enhancement New feature or request and removed bug Something isn't working labels Sep 26, 2022
@b-kelly b-kelly changed the title bug(editor) link text at end should have link trimmed with space appended Link text at end should have link trimmed with space appended Sep 26, 2022
@b-kelly
Copy link
Collaborator

b-kelly commented Sep 26, 2022

Testing in a few other editors, it looks like not that many take this into account. GDocs and GH both include the space as part of the link. Slack does strip the space, but only for links (not other marks). Marking as enhancement instead of bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mode - markdown Affects the editor's markdown input mode mode - rich text Affects the editor's rich text (wysiwyg) mode
Projects
Status: Todo
Development

No branches or pull requests

2 participants