From 1abce75a05200845840ef2bf728bdb79e28ff422 Mon Sep 17 00:00:00 2001 From: ClaudioDrews Date: Sun, 7 Jun 2026 08:14:40 -0300 Subject: [PATCH] fix: strip YAML quotes in curate_entry ID comparison (fixes #20) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit m.group(1) captures 'f95842e2' (with quotes) from YAML id: field. Comparison with unquoted entry_id always failed → no entry ever found. Added .strip('"') after .strip() to normalize before comparison. --- icarus/state.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icarus/state.py b/icarus/state.py index cb50742..86390ec 100644 --- a/icarus/state.py +++ b/icarus/state.py @@ -477,7 +477,7 @@ def curate_entry(entry_id, training_value): for f in d.glob("*.md"): head = f.read_text("utf-8")[:400] m = re.search(r"^id: (.+)$", head, re.MULTILINE) - if not m or m.group(1).strip() != entry_id: + if not m or m.group(1).strip().strip('"') != entry_id: continue text = f.read_text("utf-8")