Changeset 8876
Legend:
- Unmodified
- Added
- Removed
-
trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_textPrim/xedUi/text.xbl.xml
r8873 r8876 3445 3445 if(vCar==32){ 3446 3446 //On check qu'il n'y ait pas déjà un espace autour. 3447 vRange = vSel.getRangeAt(0);3448 3447 var vNode = vRange.startContainer; 3449 3448 if(vNode.nodeType==3) { … … 3461 3460 } 3462 3461 this.fRichTextInput.setDirty(true); 3463 if(xed.getCurrentLang().indexOf("fr")>=0 && (vCar==58 || vCar==59 || vCar==33 || vCar==63) ) { 3464 vRange = vSel.getRangeAt(0); 3465 var vNode = vRange.startContainer; 3466 if(vNode.nodeType==3) { 3467 var vStart = vRange.startOffset; 3468 if(vStart > 0){ 3469 var vPrevCharCode = vNode.data.charCodeAt(vStart - 1); 3470 //Espace inséccable déjà là ou protocole, comportement normal 3471 if(vPrevCharCode == 160 || ( vCar==58 && /\bmailto$|\b(ht|s?f)tp(s?)$/.test(vNode.data)) ) return; 3462 var vNode = vRange.startContainer; 3463 if(vNode.nodeType==3) { 3464 var vStart = vRange.startOffset; 3465 if(vStart > 0){ 3466 var vPrevCharCode = vNode.data.charCodeAt(vStart - 1); 3467 //si char précédent = espace inséccable, on gère nous-même sinon Moz remplace par un espace normal. 3468 //ponctuation française sauf ':' suivant un protocole, comportement normal 3469 if(vPrevCharCode==160 || (xed.getCurrentLang().indexOf("fr")>=0 && (vCar==59 || vCar==33 || vCar==63 || (vCar==58 && ! /\bmailto$|\b(ht|s?f)tp(s?)$/.test(vNode.data)) )) ) { 3472 3470 var vTrans = { 3473 3471 doTransaction : function(){ 3474 if(vPrevCharCode == 32 ) {3472 if(vPrevCharCode == 32 || vPrevCharCode == 160) { 3475 3473 vNode.replaceData(vStart-1, 1, String.fromCharCode(0xA0, vCar)); 3476 3474 vSel.collapse(vNode, vStart+1); -
trunk/Xul_XedLib/chrome/content/scenarixedlib/core/xed.js
r8873 r8876 1995 1995 if( ! vSel.isCollapsed) vEditor.deleteSelection(0); 1996 1996 var vPrevCharCode = vNode.data.charCodeAt(vStart - 1); 1997 // Espace inséccable déjà là ou protocole précédant uun ":", comportement normal1998 if( vPrevCharCode == 160 || ( vCar==58 && /\bmailto$|\b(ht|s?f)tp(s?)$/.test(vNode.data)) ) return;1997 //':' suivant un protocole, comportement normal 1998 if( vCar==58 && /\bmailto$|\b(ht|s?f)tp(s?)$/.test(vNode.data) ) return; 1999 1999 var vTrans = { 2000 2000 doTransaction : function(){ 2001 if(vPrevCharCode == 32 ) {2001 if(vPrevCharCode == 32 || vPrevCharCode == 160) { 2002 2002 vNode.replaceData(vStart-1, 1, String.fromCharCode(0xA0, vCar)); //0xA0 2003 2003 vSel.collapse(vNode, vStart+1);
Note: See TracChangeset
for help on using the changeset viewer.