Skip to content

Commit eac8c65

Browse files
committed
fix
1 parent 67afa1c commit eac8c65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/skel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ def _ask_variable_choice(name, choices, default=None):
8282
# [a-zA-Z0-9][a-zA-Z0-9_.-]*[a-zA-Z0-9]
8383
def _alpha_num(string):
8484
s = re.sub(r"[^a-zA-Z0-9_.-]", "", string.lower().replace(" ", "").replace("-", ""))
85-
while s.startswith("_.-"):
85+
while len(s) and s[0] in "_.-":
8686
s = s[1:]
87-
while s.endswith("_.-"):
87+
while len(s) and s[-1] in "_.-":
8888
s = s[:-1]
8989
return s
9090

0 commit comments

Comments
 (0)