report: participants as small chips at the end, hidden in the PDF
This commit is contained in:
+4
-2
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user