diff options
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r-- | yt_dlp/utils.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py index 4ff53573f..2bd0925b6 100644 --- a/yt_dlp/utils.py +++ b/yt_dlp/utils.py @@ -4438,8 +4438,8 @@ OUTTMPL_TYPES = { # As of [1] format syntax is: # %[mapping_key][conversion_flags][minimum_width][.precision][length_modifier]type # 1. https://docs.python.org/2/library/stdtypes.html#string-formatting -STR_FORMAT_RE = r'''(?x) - (?<!%) +STR_FORMAT_RE_TMPL = r'''(?x) + (?<!%)(?P<prefix>(?:%%)*) % (?P<has_key>\((?P<key>{0})\))? # mapping key (?P<format> @@ -4447,10 +4447,11 @@ STR_FORMAT_RE = r'''(?x) (?:\d+)? # minimum field width (optional) (?:\.\d+)? # precision (optional) [hlL]? # length modifier (optional) - [diouxXeEfFgGcrs] # conversion type + {1} # conversion type ) ''' +STR_FORMAT_TYPES = 'diouxXeEfFgGcrs' def limit_length(s, length): """ Add ellipses to overly long strings """ |