match = function(query, option) {
  var text = option.textContent;
  var RX = new RegExp( query, "ig" );
  var result = RX.exec( text );
  if (result) {
    // #102 stop xss
    option.innerHTML = "";
    var span = document.createElement( "span" );
    span.classList.add( "selectr-match" );
    span.textContent = result[0];
    option.appendChild( document.createTextNode( text.substring( 0, result.index ) ) );
    option.appendChild( span );
    option.appendChild( document.createTextNode( text.substring( RX.lastIndex ) ) );
    return true;
  }
  return false;
}
Query matching for searches.
Wraps matching text in a span.selectr-match.

@param  {string} query
@param  {HTMLOptionElement} option element
@return {bool} true if matched; false otherwise