Skip to content

Commit 660cf9d

Browse files
authored
Merge pull request #15044 from dotty-staging/scaladoc/searchbar-bugfix
Fix match by kind in searchbar
2 parents 646f1a5 + c0f8a25 commit 660cf9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scaladoc-js/main/src/searchbar/engine/Matchers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ case class ByName(query: String) extends Matchers:
2525
}
2626

2727
case class ByKind(kind: String) extends Matchers:
28-
def apply(p: PageEntry): Int = p.fullName.split(" ").headOption.filter(_.equalsIgnoreCase(kind)).fold(-1)(_ => 1)
28+
def apply(p: PageEntry): Int = if p.kind.equalsIgnoreCase(kind) then 1 else -1

0 commit comments

Comments
 (0)