Enable preservation of grapheme clusters in highlightQuery
[lhc/web/wiklou.git] / resources / src / mediawiki.widgets / mw.widgets.TitleOptionWidget.js
index a5b71b9..89de155 100644 (file)
@@ -23,7 +23,7 @@
         * @cfg {boolean} [redirect] Page is a redirect
         * @cfg {boolean} [disambiguation] Page is a disambiguation page
         * @cfg {string} [query] Matching query string to highlight
-        * @cfg {string} [compare] String comparison function for query highlighting
+        * @cfg {Function} [compare] String comparison function for query highlighting
         */
        mw.widgets.TitleOptionWidget = function MwWidgetsTitleOptionWidget( config ) {
                var icon;
@@ -73,7 +73,7 @@
 
                // Highlight matching parts of link suggestion
                if ( config.query ) {
-                       this.setHighlightedQuery( config.data, config.query, config.compare );
+                       this.setHighlightedQuery( config.data, config.query, config.compare, true );
                }
                this.$label.attr( 'title', config.data );