added tryling, v0

This commit is contained in:
sergeych committed 2025-11-21 00:38:43 +01:00
1 parent 2b320ab52a
commit fa3fda144b
4 files changed
+196 -1

No files matched your search

+6 -1
View File
@@ -194,7 +194,12 @@ fun ensureDocsLayoutStyles() {
// DocLink and UnsafeRawHtml moved to Components.kt
fun currentRoute(): String = window.location.hash.removePrefix("#/")
fun currentRoute(): String {
val h = window.location.hash
// Support both "#/path" and "#path" formats
val noHash = if (h.startsWith("#")) h.substring(1) else h
return noHash.removePrefix("/")
}
fun routeToPath(route: String): String {
val noParams = stripQuery(stripFragment(route))