Page MenuHomePhabricator

typing [[ after a letter in Visual Editor links the text before the [[ instead of beginning a new link at that place
Closed, ResolvedPublic8 Estimated Story Points

Description

Typing [[ in VE works in a nice DWIM way by starting a new link.

This works correctly when typing [[ after a space, but typing it after a letter jumps back and applies the link to the text before the [[ characters. I would expect the link to begin after the [[ characters and not before them.

To reproduce:

  • Edit in VE
  • Type a[[
  • Type ASCII in the link inspector.

Observed: [[ characters disappear, link inspector is shown, the link is applied to a ([[ASCII|a]]).
Expected: [[ characters disappear, link inspector is shown, the chosen link is applied after a (a[[ASCII]]).

This may seem weird and unnecessary in English, but it is a very common situation in Hebrew and Arabic, where most prepositions and conjunctions like "in", "and", "to", etc., are written with the word and without a space, and may be relevant for some other languages as well.

Event Timeline

Change 285157 had a related patch set uploaded (by Esanders):
Allow the link inspector to open without expanding the selection

https://gerrit.wikimedia.org/r/285157

Also French, e.g. l'[[Union européenne]] Actually l' has a word break after it so that already works.

Change 285158 had a related patch set uploaded (by Esanders):
Don't expand link selections when opening with '[[' sequence

https://gerrit.wikimedia.org/r/285158

Esanders triaged this task as Low priority.
Esanders set the point value for this task to 1.

Change 285157 merged by jenkins-bot:
Allow the link inspector to open without expanding the selection

https://gerrit.wikimedia.org/r/285157

Change 285158 merged by jenkins-bot:
Don't expand link selections when opening with '[[' sequence

https://gerrit.wikimedia.org/r/285158