| ... | ... | @@ -4328,9 +4328,9 @@ function addDeclToSearchResults(decl, declIndex, modNames, item, list, stack) { |
| 4328 | 4328 | // shallow path are preferable |
| 4329 | 4329 | const path_depth = canonPath.declNames.length * 50; |
| 4330 | 4330 | // matching the start of a decl name is good |
| 4331 | | const match_from_start = decl_name.startsWith(term) ? -term.length * (1 -ignoreCase) : (decl_name.length - term.length) + 1; |
| 4331 | const match_from_start = decl_name.startsWith(term) ? -term.length * (2 -ignoreCase) : (decl_name.length - term.length) + 1; |
| 4332 | 4332 | // being a perfect match is good |
| 4333 | | const is_full_match = (list == result.full) ? -decl_name.length * (2 - ignoreCase) : decl_name.length - term.length; |
| 4333 | const is_full_match = (decl_name === term) ? -decl_name.length * (1 - ignoreCase) : Math.abs(decl_name.length - term.length); |
| 4334 | 4334 | // matching the end of a decl name is good |
| 4335 | 4335 | const matches_the_end = decl_name.endsWith(term) ? -term.length * (1 - ignoreCase) : (decl_name.length - term.length) + 1; |
| 4336 | 4336 | // explicitly penalizing scream case decls |
| ... | ... | @@ -4409,7 +4409,7 @@ function addDeclToSearchResults(decl, declIndex, modNames, item, list, stack) { |
| 4409 | 4409 | |
| 4410 | 4410 | const href = navLink(canonPath.modNames, canonPath.declNames); |
| 4411 | 4411 | |
| 4412 | | matchedItemsHTML += "<li><a href=\"" + href + "\">" + text + "</a></li>"; |
| 4412 | matchedItemsHTML += "<li><a href=\"" + href + "\">" + text + "</a></li>"; |
| 4413 | 4413 | } |
| 4414 | 4414 | } |
| 4415 | 4415 | |