added tryling, v0
This commit is contained in:
1 parent
2b320ab52a
commit
fa3fda144b
4 files changed
+196
-1
No files matched your search
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user