Skip to content

Commit

Permalink
Normalize underscores for schema file names
Browse files Browse the repository at this point in the history
They are now replaced with hyphens, just like whitespace characters.
  • Loading branch information
remcohaszing committed Aug 13, 2024
1 parent 4143028 commit 2e03e64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ for (const [urls, matches] of schemasByUrls) {
const name = match
.replaceAll(/\b(json|schema)\b/g, '')
.replaceAll('*', '')
.replaceAll(/\W+/g, '-')
.replaceAll(/[\W_]+/g, '-')
.replaceAll(/(^-|-$)/g, '')
url = `./schemas/${name}.schema.json`
await writeFile(
Expand Down

0 comments on commit 2e03e64

Please sign in to comment.