/**
Provides pre-built result highlighters for AutoComplete.
@module autocomplete
@submodule autocomplete-highlighters
@class AutoCompleteHighlighters
@static
**/
var YArray = Y.Array,
// -- Public Methods -------------------------------------------------------
/**
Highlights any individual query character that occurs anywhere in a result.
Case-insensitive.
@method charMatch
@param {String} query Query to match
@param {Array} results Results to highlight
@return {Array} Highlighted results
@static
**/
// The caseSensitive parameter is only intended for use by
// charMatchCase(). It's intentionally undocumented.
});
});
},
/**
Case-sensitive version of `charMatch()`.
@method charMatchCase
@param {String} query Query to match
@param {Array} results Results to highlight
@return {Array} Highlighted results
@static
**/
},
/**
Highlights the complete query as a phrase anywhere within a result. Case-
insensitive.
@method phraseMatch
@param {String} query Query to match
@param {Array} results Results to highlight
@return {Array} Highlighted results
@static
**/
// The caseSensitive parameter is only intended for use by
// phraseMatchCase(). It's intentionally undocumented.
});
});
},
/**
Case-sensitive version of `phraseMatch()`.
@method phraseMatchCase
@param {String} query Query to match
@param {Array} results Results to highlight
@return {Array} Highlighted results
@static
**/
},
/**
Highlights the complete query as a phrase at the beginning of a result.
Case-insensitive.
@method startsWith
@param {String} query Query to match
@param {Array} results Results to highlight
@return {Array} Highlighted results
@static
**/
// The caseSensitive parameter is only intended for use by
// startsWithCase(). It's intentionally undocumented.
startsWith : true
});
});
},
/**
Case-sensitive version of `startsWith()`.
@method startsWithCase
@param {String} query Query to match
@param {Array} results Results to highlight
@return {Array} Highlighted results
@static
**/
},
/**
Highlights portions of results in which words from the query match either
whole words or parts of words in the result. Non-word characters like
whitespace and certain punctuation are ignored. Case-insensitive.
@method subWordMatch
@param {String} query Query to match
@param {Array} results Results to highlight
@return {Array} Highlighted results
@static
**/
// The caseSensitive parameter is only intended for use by
// subWordMatchCase(). It's intentionally undocumented.
});
});
});
},
/**
Case-sensitive version of `subWordMatch()`.
@method subWordMatchCase
@param {String} query Query to match
@param {Array} results Results to highlight
@return {Array} Highlighted results
@static
**/
},
/**
Highlights individual words in results that are also in the query. Non-word
characters like punctuation are ignored. Case-insensitive.
@method wordMatch
@param {String} query Query to match
@param {Array} results Results to highlight
@return {Array} Highlighted results
@static
**/
// The caseSensitive parameter is only intended for use by
// wordMatchCase(). It's intentionally undocumented.
});
});
},
/**
Case-sensitive version of `wordMatch()`.
@method wordMatchCase
@param {String} query Query to match
@param {Array} results Results to highlight
@return {Array} Highlighted results
@static
**/
}
});