Enable preservation of grapheme clusters in highlightQuery
authortjones <tjones@wikimedia.org>
Tue, 24 Sep 2019 20:42:05 +0000 (16:42 -0400)
committertjones <tjones@wikimedia.org>
Tue, 24 Sep 2019 20:42:44 +0000 (16:42 -0400)
Make use of the option to preserve grapheme clusters in highlightQuery
in OOUI's LabelElement.js so that partial matches in the main search
page on Special:Search don't break graphemes.

Bug: T35242
Depends-On: Iac79095a1b40ef92b3cfd9421916928217639434
Change-Id: I5c458da39156db8a39412b91cf647aacd43fbbb9

resources/src/mediawiki.widgets/mw.widgets.TitleOptionWidget.js

index 0eb1134..89de155 100644 (file)
@@ -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 );