Skip to content

Commit de77158

Browse files
committed
Disallow ending slug in dash or underscore
1 parent df2472f commit de77158

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/workshop_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
HUMANTIME_PATTERN = r'((0?[1-9]|1[0-2]):[0-5]\d(am|pm)(-|to)(0?[1-9]|1[0-2]):[0-5]\d(am|pm))|((0?\d|1\d|2[0-3]):[0-5]\d(-|to)(0?\d|1\d|2[0-3]):[0-5]\d)'
1616
EVENTBRITE_PATTERN = r'\d{9,10}'
1717
URL_PATTERN = r'https?://.+'
18-
SLUG_PATTERN = r'\d{4}-\d{2}-\d{2}-[A-z0-9\-\_]+'
18+
SLUG_PATTERN = r'\d{4}-\d{2}-\d{2}-[A-z0-9\-\_]+[^-_]$'
1919

2020
# Defaults.
2121
CARPENTRIES = ("dc", "swc", "lc", "cp")

0 commit comments

Comments
 (0)