Skip to content

Commit

Permalink
Replace all hyphens, not just the first
Browse files Browse the repository at this point in the history
  • Loading branch information
fofr committed Jun 23, 2022
1 parent a1b60e8 commit dfc2251
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x-govuk/components/components.11tydata.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const humanise = (string) => {
string = string.replace('/README', '').replace('/', '')
string = string.replace('-', ' ')
string = string.replaceAll('-', ' ')
string = string.trim().replace(/^\w/, (c) => c.toUpperCase())
return string
}
Expand Down

0 comments on commit dfc2251

Please sign in to comment.