mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Fix skills with hypens
This commit is contained in:
4 files changed
+13
-11
No files matched your search
+3
-3
@@ -20,10 +20,10 @@ export interface SkillFrontmatter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates a skill name (alphanumeric lowercase only)
|
||||
* Validates a skill name (alphanumeric lowercase with hyphens)
|
||||
*/
|
||||
export function isValidSkillName(name: string): boolean {
|
||||
return /^[a-z0-9]+$/.test(name);
|
||||
return /^[a-z0-9-]+$/.test(name);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,7 +84,7 @@ export async function getPluginSkills(
|
||||
|
||||
// Validate skill name format
|
||||
if (!isValidSkillName(frontmatter.name)) {
|
||||
console.warn(`Skill at ${skillPath} has invalid name "${frontmatter.name}" (must be alphanumeric lowercase only)`);
|
||||
console.warn(`Skill at ${skillPath} has invalid name "${frontmatter.name}" (must be lowercase alphanumeric with hyphens)`);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user