Fix dynamic memoir image limits

This commit is contained in:
Kevin
2026-03-11 14:07:02 +08:00
parent 822aefe54b
commit f7d95c4c9a
5 changed files with 214 additions and 17 deletions

View File

@@ -23,7 +23,7 @@ def parse_image_placeholders(content: str, max_images: int) -> list[dict[str, An
"start_offset": match.start(),
}
)
if len(items) >= max_images:
if max_images is not None and len(items) >= max_images:
break
return items