diff --git a/apps/web/prebuild.js b/apps/web/prebuild.js index ff1b60951..169d025c4 100644 --- a/apps/web/prebuild.js +++ b/apps/web/prebuild.js @@ -49,7 +49,9 @@ function toAnchorLink(title) { // Remove special characters except dashes and spaces title = title.replace(/[^a-zA-Z0-9\- ]/g, '') // Add dashes between words for camelCase - title = title.replace(/([a-z])([A-Z])/g, '$1-$2') + title = title + .replace(/([A-Z]+)([A-Z][a-z])/g, '$1-$2') + .replace(/([a-z])([A-Z])/g, '$1-$2') return '#' + title.toLowerCase().replace(/ /g, '-') }