File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1010 'click==7.0' ,
1111 'google-api-python-client==1.6.3' ,
1212 'requests==2.20.0' ,
13- 'python-slugify==1.2.6 '
13+ 'python-slugify==4.0.0 '
1414]
1515
1616dev_requirements = [
Original file line number Diff line number Diff line change 11import os
2+ import re
23import sys
34import time
45
@@ -23,7 +24,13 @@ class PacktConnectionError(ConnectionError):
2324
2425def slugify_product_name (title ):
2526 """Return book title with spaces replaced by underscore and unicodes replaced by characters valid in filenames."""
26- return slugify (title , separator = '_' , lowercase = False )
27+ return slugify (
28+ title ,
29+ separator = '_' ,
30+ lowercase = False ,
31+ regex_pattern = re .compile (r'[^-a-zA-Z0-9\+\#\.\-\–]+' ),
32+ replacements = [['–' , '-' ]]
33+ )
2734
2835
2936def wait_for_computation (predicate , timeout , retry_after ):
You can’t perform that action at this time.
0 commit comments