Fix multiline specifications of TODO properties.
Some checks failed
Testing / pytest (push) Successful in 41s
Testing / mypy (push) Failing after 37s
Testing / stability-extra-test (push) Successful in 28s

This commit is contained in:
Sergio Martínez Portela 2024-03-22 01:54:46 +01:00
parent 9e994ba323
commit 423d6f9842

View File

@ -1871,7 +1871,7 @@ class OrgDoc:
for keyword in keywords: for keyword in keywords:
if keyword.key in ("TODO", "SEQ_TODO"): if keyword.key in ("TODO", "SEQ_TODO"):
todo_kws, done_kws = re.sub(r"\(.\)", "", keyword.value).split("|", 1) todo_kws, done_kws = re.sub(r"\([^)]+\)", "", keyword.value).split("|", 1)
self.todo_keywords = re.sub(r"\s{2,}", " ", todo_kws.strip()).split() self.todo_keywords = re.sub(r"\s{2,}", " ", todo_kws.strip()).split()
self.done_keywords = re.sub(r"\s{2,}", " ", done_kws.strip()).split() self.done_keywords = re.sub(r"\s{2,}", " ", done_kws.strip()).split()