Skip to content
Merged
Prev Previous commit
Next Next commit
Formatting
  • Loading branch information
robsdedude committed Feb 12, 2026
commit d5f5001f96cfceb7d529ee07506ac1a227c1dfcc
11 changes: 9 additions & 2 deletions Lib/email/_header_value_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2939,8 +2939,15 @@ def _refold_parse_tree(parse_tree, *, policy):
(last_charset == 'unknown-8bit' or
last_charset == 'utf-8' and charset != 'us-ascii')):
last_ew = None
last_ew = _fold_as_ew(tstr, lines, maxlen, last_ew,
part.ew_combine_allowed, charset, last_word_is_ew)
last_ew = _fold_as_ew(
tstr,
lines,
maxlen,
last_ew,
part.ew_combine_allowed,
charset,
last_word_is_ew,
)
last_word_is_ew = True
last_charset = charset
want_encoding = False
Expand Down