Merge "Fix use of removed function isUniqueListKey"

This commit is contained in:
jenkins-bot 2013-09-25 10:11:41 +00:00 committed by Gerrit Code Review
commit 26de3d7d51

View file

@ -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