Replace slash and backslash with similar unicode
This commit is contained in:
parent
ccf55dbeef
commit
0c9a667da7
@ -108,7 +108,7 @@ class _PostPathFormatter(_ArbitraryItemFormatter):
|
||||
ret = super().vformat(format_string, args, kwargs)
|
||||
if platform.system() == 'Windows':
|
||||
ret = ret.replace(':', '\ua789').replace('<', '\ufe64').replace('>', '\ufe65').replace('\"', '\uff02')
|
||||
ret = ret.replace('\\', '\uff3c').replace('|', '\uff5c').replace('?', '\ufe16').replace('*', '\uff0a')
|
||||
ret = ret.replace('\\', '\ufe68').replace('|', '\uff5c').replace('?', '\ufe16').replace('*', '\uff0a')
|
||||
return ret
|
||||
|
||||
|
||||
|
@ -256,7 +256,7 @@ class Post:
|
||||
def pcaption(self) -> str:
|
||||
"""Printable caption, useful as a format specifier for --filename-pattern."""
|
||||
def _elliptify(caption):
|
||||
pcaption = ' '.join([s.replace('/', '∕') for s in caption.splitlines() if s]).strip()
|
||||
pcaption = ' '.join([s.replace('/', '\u2215') for s in caption.splitlines() if s]).strip()
|
||||
return (pcaption[:30] + u"\u2026") if len(pcaption) > 31 else pcaption
|
||||
return _elliptify(self.caption) if self.caption else ''
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user