mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
...
This commit is contained in:
parent
6a7c77c41c
commit
aae106cdf3
@ -22,7 +22,7 @@ from calibre.utils.imghdr import what
|
|||||||
def sanitize_file_name(x):
|
def sanitize_file_name(x):
|
||||||
ans = re.sub(r'\s+', ' ', re.sub(r'[?&=;#]', '_', ascii_filename(x))).strip().rstrip('.')
|
ans = re.sub(r'\s+', ' ', re.sub(r'[?&=;#]', '_', ascii_filename(x))).strip().rstrip('.')
|
||||||
ans, ext = ans.rpartition('.')[::2]
|
ans, ext = ans.rpartition('.')[::2]
|
||||||
return ans.strip() + '.' + ext.strip()
|
return (ans.strip() + '.' + ext.strip()).rstrip('.')
|
||||||
|
|
||||||
|
|
||||||
class HTMLInput(InputFormatPlugin):
|
class HTMLInput(InputFormatPlugin):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user