Skip to content

Commit c8b58be

Browse files
authored
Merge pull request #6 from szymon-rd/fix-search-elements
Remove div from search results
2 parents 0a0b2fb + dc1e368 commit c8b58be

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

scaladoc-js/main/src/searchbar/SearchbarComponent.scala

+10-10
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,21 @@ class SearchbarComponent(engine: PageSearchEngine, inkuireEngine: InkuireJSSearc
3232
" extension on " + p.extensionTarget
3333
}
3434

35-
div(cls := "scaladoc-searchbar-row mono-small-inline", "result" := "")(
36-
a(href := location)(
37-
p.fullName.zipWithIndex.map((c, i) => if boldChars.contains(i) then b(c.toString) else c.toString),
38-
span(i(extensionTargetMessage)),
39-
span(cls := "pull-right scaladoc-searchbar-location")(p.description)
40-
).tap { _.onclick = (event: Event) =>
41-
if (document.body.contains(rootDiv)) {
42-
document.body.removeChild(rootDiv)
43-
}
35+
a(cls := "scaladoc-searchbar-row mono-small-inline", href := location)(
36+
p.fullName.zipWithIndex.map((c, i) => if boldChars.contains(i) then b(c.toString) else c.toString),
37+
span(i(extensionTargetMessage)),
38+
span(cls := "pull-right scaladoc-searchbar-location")(p.description)
39+
).tap { _.onclick = (event: Event) =>
40+
if (document.body.contains(rootDiv)) {
41+
document.body.removeChild(rootDiv)
4442
}
45-
).tap { wrapper => wrapper.addEventListener("mouseover", {
43+
}.tap { wrapper =>
44+
wrapper.addEventListener("mouseover", {
4645
case e: MouseEvent => handleHover(wrapper)
4746
})
4847
}
4948

49+
5050
extension (m: InkuireMatch)
5151
def toHTML =
5252
val location = if (m.pageLocation(0) == 'e') {

0 commit comments

Comments
 (0)