fix: dots in island + route name not working (#2105)

This commit is contained in:
Marvin Hagemeister
2023-11-30 18:14:59 +01:00
committed by GitHub
parent a0483bc357
commit 054ffbb44a
7 changed files with 54 additions and 21 deletions
+2 -1
View File
@@ -32,6 +32,7 @@ import {
} from "./deps.ts";
import { BUILD_ID } from "./build_id.ts";
import { toBaseRoute } from "./compose.ts";
import { stringToIdentifier } from "./init_safe_deps.ts";
export const ROOT_BASE_ROUTE = toBaseRoute("/");
@@ -525,7 +526,7 @@ function toPascalCase(text: string): string {
}
function sanitizeIslandName(name: string): string {
const fileName = name.replaceAll(/[/\\\\\(\)\[\]]/g, "_");
const fileName = stringToIdentifier(name);
return toPascalCase(fileName);
}