fix(docs): include short words in keywords

Short words like $q are now searchable.

Closes #967
This commit is contained in:
Misko Hevery 2012-05-23 12:05:05 -07:00
parent 92a2e18076
commit 275e5335dc

View file

@ -54,7 +54,7 @@ Doc.prototype = {
function extractWords(text) {
var tokens = text.toLowerCase().split(/[,\.\`\'\"\#\s]+/mg);
tokens.forEach(function(key){
var match = key.match(/^(([\$\_a-z]|ng\:)[\w\_\-]{2,})/);
var match = key.match(/^(([\$\_a-z]|ng\:)[\w\_\-]+)/);
if (match){
key = match[1];
if (!keywords[key]) {