File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -78,10 +78,6 @@ fabric.SHARED_ATTRIBUTES = [
7878/* _FROM_SVG_END_ */
7979
8080
81- fabric . reNonWord = / [ \n \. , ; ! \? \- ] / ;
82-
83-
84-
8581/**
8682 * @todo move to config when window is exported
8783 */
Original file line number Diff line number Diff line change 22import { Point } from '../point.class' ;
33import { removeFromArray } from '../util/internals' ;
44
5+ // extend this regex to support non english languages
6+ const reNonWord = / [ \n \. , ; ! \? \- ] / ;
7+
58( function ( global ) {
69 var fabric = global . fabric ;
710 fabric . util . object . extend ( fabric . IText . prototype , /** @lends fabric.IText.prototype */ {
@@ -288,9 +291,7 @@ import { removeFromArray } from '../util/internals';
288291 searchWordBoundary : function ( selectionStart , direction ) {
289292 var text = this . _text ,
290293 index = this . _reSpace . test ( text [ selectionStart ] ) ? selectionStart - 1 : selectionStart ,
291- _char = text [ index ] ,
292- // wrong
293- reNonWord = fabric . reNonWord ;
294+ _char = text [ index ] ;
294295
295296 while ( ! reNonWord . test ( _char ) && index > 0 && index < text . length ) {
296297 index += direction ;
You can’t perform that action at this time.
0 commit comments