adjust site docs to new feature

This commit is contained in:
Sergey Chernov 2025-12-21 18:26:21 +01:00
parent 76a1804dc1
commit 99f883cfc7
2 changed files with 5 additions and 2 deletions

View File

@ -127,7 +127,7 @@ fun ReferencePage() {
Ul({ classes("mt-2") }) {
d.members.forEach { m ->
when (m) {
is MiniMemberFunDecl -> {
is MiniMemberFunDecl, -> {
val params = m.params.joinToString(", ") { p ->
val ts = typeOf(p.type)
if (ts.isNotBlank()) "${p.name}${ts}" else p.name
@ -136,6 +136,9 @@ fun ReferencePage() {
val staticStr = if (m.isStatic) "static " else ""
Li { Text("${staticStr}method ${d.name}.${m.name}(${params})${ret}") }
}
is MiniInitDecl -> {
// we don't doc init {} blocks at all
}
is MiniMemberValDecl -> {
val ts = typeOf(m.type)
val kindM = if (m.mutable) "var" else "val"

View File

@ -122,7 +122,7 @@ internal fun scoreQueryAdvanced(termsIn: List<String>, rec: DocRecord): Int {
if (token.startsWith(t) && t.length > best) { best = t.length; matched = t }
}
if (matched != null) {
posMap.getOrPut(matched!!) { mutableListOf() }.add(pos)
posMap.getOrPut(matched) { mutableListOf() }.add(pos)
}
pos++
if (pos > 100000) break // safety for extremely large docs