From cb092550a80ce00c3c42b58d644c45bf46f65c9a Mon Sep 17 00:00:00 2001 From: Alex Shensis Date: Tue, 13 Jun 2017 14:41:48 +0300 Subject: [PATCH] jquery-ui: BTD support 2 --- ui/widget.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/widget.js b/ui/widget.js index b8ef076bd..3587a4286 100644 --- a/ui/widget.js +++ b/ui/widget.js @@ -702,8 +702,8 @@ $.Widget.prototype = { _getTextDir: function( text ) { if ( this.options.textDir === "auto" ) { - // Look for first strong (either English or Arabic/Hebrew) character - // Resolve text direction accordingly ("rtl" for Arabic/Hebrew, "ltr" otherwise) + // Look for first strong (either English or Arabic/Hebrew) character. + // Resolve text direction accordingly ("rtl" for Arabic/Hebrew, "ltr" otherwise). var matcher = /[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec( text ); return ( matcher && ( matcher[ 0 ] > "z" ) ) ? "rtl" : "ltr"; } @@ -714,8 +714,8 @@ $.Widget.prototype = { if ( typeof param === "string" ) { param = param.replace( /[\u202A\u202B\u202C]/g, "" ); - // Unicode directional characters: 202A and 202B used to enforce text direction - // 202C - POP formatter closing directional segment + // Unicode directional characters: 202A and 202B used to enforce text direction. + // 202C - POP formatter closing directional segment. return ( this._getTextDir( param ) === "rtl" ? "\u202B" : "\u202A" ) + param + "\u202C"; } else if ( param.jquery ) { var isField = param.is( "input" ) || param.is( "textarea" );