Skip to content

Commit 44564e5

Browse files
author
Petr Vesely
committed
[UR] Fix kebab case regex
1 parent aa5d052 commit 44564e5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

scripts/add_experimental_feature.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
import subprocess
1414

1515
def verify_kebab_case(input: str) -> bool:
16-
# kebab case regex from https://github.com/expandjs/expandjs/blob/master/lib/kebabCaseRegex.js
17-
kebab_case_re = r"^([a-z](?![\d])|[\d](?![a-z]))+(-?([a-z](?![\d])|[\d](?![a-z])))*$|^$"
16+
kebab_case_re = r"[a-z0-9]+(?:-[a-z0-9]+)*"
1817
pattern = re.compile(kebab_case_re)
1918
if pattern.match(input) is None:
2019
return False

0 commit comments

Comments
 (0)