1
0
silverbullet/plug-api/lib/page.ts
Zef Hemel fb75ea1a65
No More Collab. Fixes #449
* Fully removes real-time collaboration
* URL scheme rewrite
2023-07-06 16:47:50 +02:00

5 lines
188 B
TypeScript

export function isValidPageName(name: string): boolean {
// Page can not be empty and not end with a file extension (e.g. "bla.md")
return name !== "" && !/\.[a-zA-Z]+$/.test(name);
}