mirror of
https://github.com/python/cpython.git
synced 2025-07-29 22:24:49 +00:00
fix format spec recursive expansion (closes #19729)
This commit is contained in:
parent
bb65b5bf1d
commit
0ee22bf774
3 changed files with 7 additions and 2 deletions
|
@ -727,8 +727,10 @@ MarkupIterator_next(MarkupIterator *self, SubString *literal,
|
|||
while (self->str.start < self->str.end) {
|
||||
switch (c = PyUnicode_READ_CHAR(self->str.str, self->str.start++)) {
|
||||
case ':':
|
||||
hit_format_spec = 1;
|
||||
count = 1;
|
||||
if (!hit_format_spec) {
|
||||
count = 1;
|
||||
hit_format_spec = 1;
|
||||
}
|
||||
break;
|
||||
case '{':
|
||||
/* the format spec needs to be recursively expanded.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue