Page MenuHomePhabricator

trim whitspaces at encapsulation
Closed, ResolvedPublic

Description

Author: a.d.bergi

Description:
When you select some words with whitespaces in the end / beginning and click on "Link" or "Bold" or whatever, they are surrounded by the inserted chars instead of beeing trimmed and appended outside of the replacement.

This feature had been provided by the old toolbar in with the function checkSelectedText() in the http://bits.wikimedia.org/skins-1.5/common/edit.js, but it just caught blanks.

Maybe I'm going to try to build my first own patch, but it would be better if someone who already knows the code could do this.


Version: unspecified
Severity: normal

Details

Reference
bz27116

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:23 PM
bzimport added a project: WikiEditor.
bzimport set Reference to bz27116.

Could you show an example of what you mean? It sounds like you are describing the current behavior... "they are surrounded by the inserted chars" and "being trimmed and appended outside of the replacement" sound like the same thing to me.

a.d.bergi wrote:

Current behavior:
bla blablabla bla _\ bla ''' blablabla ''' bla

^ selection ^      /

How it should be:
bla blablabla bla _\ bla '''blablabla''' bla

^ selection ^      /

The whitespaces in the end / beginning of the selection should be ignored. Sorry for my bad English :-)