mirror of
https://github.com/sleepypikachu/actions-branch-to-docker-tag-name.git
synced 2024-11-23 10:23:52 +08:00
Fix non-global regexes
This commit is contained in:
parent
3814aaf3ae
commit
50752fae9f
4
index.js
4
index.js
@ -24,13 +24,13 @@ try {
|
||||
result = result.replaceAll('/', '-');
|
||||
|
||||
// Replace excessive underscores
|
||||
result = result.replaceAll(/___+/, '__');
|
||||
result = result.replaceAll(/___+/g, '__');
|
||||
|
||||
// Lower case
|
||||
result = result.toLowerCase();
|
||||
|
||||
// Remove invalid characters
|
||||
result = result.replaceAll(/[^a-z0-9\._-]/, '')
|
||||
result = result.replaceAll(/[^a-z0-9\._-]/g, '')
|
||||
|
||||
// Remove start and end seperators
|
||||
result = result.replace(/^[-\._]+/, '')
|
||||
|
Loading…
Reference in New Issue
Block a user