code: function(match, shortNames, longNames) {
  			var names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {
  				return [ [k, v] ];
  			}).sort(function (a, b) {
  				return -(a[1].length - b[1].length);
  			});
  			var index = -1;
  			$.each(names, function (i, pair) {
  				var name = pair[1];
  				if (value.substr(iValue, name.length).toLowerCase() == name.toLowerCase()) {
  					index = pair[0];
  					iValue += name.length;
  					return false;
  				}
  			});
  			if (index != -1)
  				return index + 1;
  			else
  				throw 'Unknown name at position ' + iValue;
  		}
docs: Extract a name from the string value and convert to an index