detailer: skip blank lines when building the fallback prompt pool

A blank spacer line between a [CLASS=...] line and a plain fallback
line (common when formatting the prompt for readability) was being
counted as an empty fallback entry, silently pushing the real fallback
text out of position and handing untagged detections an empty prompt.
This commit is contained in:
Claude
2026-08-16 16:26:20 +00:00
parent f66748b478
commit a5876b6496
+2
View File
@@ -50,6 +50,8 @@ def parse_prompt_lines(text: str):
fallback: list[str] = []
for line in (text or '').split('\n'):
line = line.strip()
if len(line) == 0:
continue # blank spacer lines don't count as a fallback entry
m = class_tag_re.match(line)
if m:
names = [n.strip().lower() for n in m.group(1).split(',') if n.strip()]