fix: ignore comment blocks in discussion parsing
This commit is contained in:
parent
82aee9ef63
commit
eed12ce749
|
|
@ -46,11 +46,21 @@ def extract_structured_basic(text: str) -> dict[str, list]:
|
|||
mentions: list[dict[str, str]] = []
|
||||
timeline_data: dict[str, str] | None = None
|
||||
|
||||
in_comment = False
|
||||
|
||||
for line in text.splitlines():
|
||||
participant, remainder = _extract_participant(line)
|
||||
stripped = line.strip()
|
||||
if not stripped:
|
||||
continue
|
||||
if stripped.startswith("<!--"):
|
||||
if not stripped.endswith("-->"):
|
||||
in_comment = True
|
||||
continue
|
||||
if in_comment:
|
||||
if stripped.endswith("-->"):
|
||||
in_comment = False
|
||||
continue
|
||||
if stripped.startswith("#"):
|
||||
continue
|
||||
analysis = remainder.strip() if participant else stripped
|
||||
|
|
|
|||
Loading…
Reference in New Issue