Skip to content

Commit

Permalink
fix: remove unnecessary escape character (#86)
Browse files Browse the repository at this point in the history
The hyphen "-" does not need to be escaped.
  • Loading branch information
virgofx authored Oct 26, 2024
1 parent 17834cf commit 42fabc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/terraform-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function getTerraformModuleNameFromRelativePath(terraformDirectory: string): str
.replace(/(^\/|\/$)/g, '') // Remove leading/trailing slashes
.replace(/\.+$/, '') // Remove trailing dots
.replace(/\.\.+/g, '.') // Replace consecutive dots with a single dot
.replace(/\-\-+/g, '-') // Replace consecutive hyphens with a single hyphen
.replace(/--+/g, '-') // Replace consecutive hyphens with a single hyphen
.replace(/\s+/g, '') // Remove any remaining whitespace
.toLowerCase(); // All of our module names will be lowercase
}
Expand Down

0 comments on commit 42fabc2

Please sign in to comment.