mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Merge "Fix use of removed function isUniqueListKey"
This commit is contained in:
commit
26de3d7d51
|
@ -90,7 +90,7 @@ ve.ui.MWReferenceSearchWidget.prototype.onResultsSelect = function ( item ) {
|
|||
*/
|
||||
ve.ui.MWReferenceSearchWidget.prototype.buildIndex = function () {
|
||||
var i, iLen, j, jLen, group, groupName, groupNames, view, text, attr, firstNodes, indexOrder,
|
||||
refnode, name, citation,
|
||||
refnode, matches, name, citation,
|
||||
internalList = this.surface.getModel().getDocument().getInternalList(),
|
||||
groups = internalList.getNodeGroups();
|
||||
|
||||
|
@ -121,7 +121,8 @@ ve.ui.MWReferenceSearchWidget.prototype.buildIndex = function () {
|
|||
}
|
||||
|
||||
citation = ( attr.refGroup.length ? attr.refGroup + ' ' : '' ) + ( j + 1 );
|
||||
name = !ve.dm.InternalList.static.isUniqueListKey( attr.listKey ) ? attr.listKey : '';
|
||||
matches = attr.listKey.match( /^literal\/(.*)$/ );
|
||||
name = matches && matches[1] || '';
|
||||
// Make visible text, citation and reference name searchable
|
||||
text = [ view.$.text().toLowerCase(), citation, name ].join( ' ' );
|
||||
// Make URLs searchable
|
||||
|
|
Loading…
Reference in a new issue