fix: strip YAML quotes in curate_entry ID comparison (fixes #20)
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.
This commit is contained in:
parent
6418ed30a1
commit
1abce75a05
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in New Issue