package server import "strings" // Both the compact /e/docs and the historic /e/-/docs edit /docs. func semanticEditorPath(route string) string { if route == "/e/-" || route == "/e/-/" { return "/" } if strings.HasPrefix(route, "/e/-/") { return "/" + strings.TrimPrefix(route, "/e/-/") } return "/" + strings.TrimPrefix(route, "/e/") }