Skip to content

Commit

Permalink
fix: update capitalize regex to allow numbers (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
luxass committed Mar 28, 2024
1 parent ad2f754 commit ab79d3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export async function compileRule(
if (!Array.isArray(schemas))
schemas = [schemas]

const capitalizedName = name.replace(/(?:^|[^\w]+)([a-z])/g, (_, c) => c.toUpperCase())
const capitalizedName = name.replace(/(?:^|[^\w]+)([a-z|\d])/g, (_, c) => c.toUpperCase())

const jsdoc: string[] = []
if (meta.docs?.description)
Expand Down

0 comments on commit ab79d3c

Please sign in to comment.