report: participants as small chips at the end, hidden in the PDF

This commit is contained in:
Stefano Zini
2026-11-10 14:51:18 +01:00
parent 3f020cd246
commit 4ee270c37b
3 changed files with 29 additions and 75 deletions
+4 -2
View File
@@ -126,14 +126,16 @@ def review(name):
if english(text):
fail("R5", text)
# R6: read the participants section (table rows or comma list).
section = re.search(r"## Partecipanti\n(.*?)(?=\n## )", markdown_text, re.S)
# R6: read the participants section (table rows, chips or comma list); it is the last section.
section = re.search(r"## Partecipanti\n(.*?)(?=\n## |\Z)", markdown_text, re.S)
people = []
for line in section[1].splitlines() if section else []:
if line.startswith("|"):
cell = line.split("|")[1].strip()
if cell not in ("Partecipante", "") and not cell.startswith("-"):
people.append(cell)
elif "<span>" in line:
people += re.findall(r"<span>(.*?)</span>", line)
elif line.strip() and not line.startswith("*"):
people += [name_part.strip() for name_part in line.split(",")]
# R6: no initials or truncated names.