Skip to content

Commit 6e55ceb

Browse files
pikinier20olhotak
authored andcommitted
Fix match by kind in searchbar
1 parent 646f1a5 commit 6e55ceb

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)