Use note: lines for HTML metadata, not # comments
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -18,13 +18,15 @@ RESET = "\033[0m"
|
||||
|
||||
def load_sample_names(path: Path) -> list[str]:
|
||||
# Optional "NAME > REF": keep only the sample name (before ">").
|
||||
# Skip "#" comments and "note: ..." metadata lines.
|
||||
names = []
|
||||
for line in path.read_text(encoding="utf-8").splitlines():
|
||||
line = line.strip()
|
||||
if line and not line.startswith("#"):
|
||||
if ">" in line:
|
||||
line = line.split(">", 1)[0].strip()
|
||||
names.append(line)
|
||||
if not line or line.startswith("#") or line.lower().startswith("note:"):
|
||||
continue
|
||||
if ">" in line:
|
||||
line = line.split(">", 1)[0].strip()
|
||||
names.append(line)
|
||||
return names
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user