Skip to content

Commit 5861caa

Browse files
stripping whitespaces from user queries (#155)
1 parent f14ee29 commit 5861caa

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

readme.md

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ Make sure that olean files are generated for mathlib in `_target`, otherwise thi
2121

2222
`./gen_docs` will create a directory `html` with the generated documentation.
2323

24+
If you don't have enough RAM to run `./gen_docs`, consider downloading the documentation
25+
from [here](https://github.com/leanprover-community/mathlib_docs) and renaming `docs` to `html`.
26+
2427
The links will point to `/` as the root of the site.
2528
I typically host a server from the `html` directory with `python3 -m http.server`.
2629
If you intend to host the site somewhere else than the root,

search.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ function loadDecls(declBmpCnt) {
2929
function getMatches(decls, pat, maxResults = 20) {
3030
// const lowerPat = pat.toLowerCase();
3131
// const caseSensitive = pat !== lowerPat;
32+
const patNoSpaces = pat.replace(/\s/g, '');
3233
const results = [];
3334
for (const [decl, lowerDecl] of decls) {
34-
const err = matchCaseSensitive(decl, lowerDecl, pat);
35+
const err = matchCaseSensitive(decl, lowerDecl, patNoSpaces);
3536
if (err !== undefined) {
3637
results.push({decl, err});
3738
}

0 commit comments

Comments
 (0)