Change anchor reference syntax

This commit is contained in:
Zef Hemel
2023-11-03 12:01:33 +01:00
parent 28b0e9f9e9
commit e0b6fbed3e
20 changed files with 47 additions and 31 deletions
+6
View File
@@ -6,6 +6,12 @@ export function validatePageName(name: string) {
if (name.startsWith(".")) {
throw new Error("Page name cannot start with a '.'");
}
if (name.includes("@")) {
throw new Error("Page name cannot contain '@'");
}
if (name.includes("$")) {
throw new Error("Page name cannot contain '$'");
}
if (/\.[a-zA-Z]+$/.test(name)) {
throw new Error("Page name can not end with a file extension");
}