-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
search for function* #3114
search for function* #3114
Conversation
for key in keys: | ||
print(f"{key:{longest_key + 1}} {token[key]!r}") | ||
print() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just needed the above fixed for my local debugging because after I've run the indexing I run many different variables of
poetry run deployer search-analyze "function*"
Note-to-self; Once this lands, remember to run a Dev build because that's what many of us are using for our local kuma docker-compose when we don't want to run a local |
# is a "risk" worth accepting because event `*emphasis*` would get converted | ||
# to `emphasisstar` which is more accurate than letting the standard tokenizer | ||
# turn it into `emphasis` alone. | ||
pattern="([\\w]+)-?\\*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit. It seems this could be simplified to:
pattern="([\\w]+)-?\\*", | |
pattern="(\\w+)-?\\*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! I think it's because I used to have [a-z]
in there but that implies all lowercase. And Function*
is a real word, so I later changed it to \w
and forgot to remove the [
and ]
.
Good catch!
Also, \w
means [a-zA-Z_0-9]
which I'm not sure is right. But it's hard to tell.
Currently, based on looking at every single en-US document title
I think the regex is sane. That _
and 0-9
stuff might make a difference within the texts of the body but as long as the first result is what people expect, I'm not too worried.
* search for function* Fixes mdn#3113 * feedbacked
Fixes #3113
Can't argue with the results:
The reason the
Using Fetch
document turns up there is because that page has such a high popularity that simply matching the start of the word gives it a tiny matchness and combined with its popularity it comes up pretty high.But the most important thing is the first search result which is what people expect.