From 9e994ba3230c629aac50026b5b5fdb4a6bc96d81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Wed, 21 Feb 2024 23:00:59 +0100 Subject: [PATCH 1/2] Accept numbers as end of implicit link. --- org_rw/org_rw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org_rw/org_rw.py b/org_rw/org_rw.py index b1dff79..3217430 100644 --- a/org_rw/org_rw.py +++ b/org_rw/org_rw.py @@ -94,7 +94,7 @@ LIST_ITEM_RE = re.compile( r"(?P\s*)((?P[*\-+])|((?P\d|[a-zA-Z])(?P[.)]))) ((?P\s*)\[(?P[ Xx])\])?((?P\s*)(?P.*?)::)?(?P.*)" ) -IMPLICIT_LINK_RE = re.compile(r'(https?:[^<> ]*[a-zA-Z])') +IMPLICIT_LINK_RE = re.compile(r'(https?:[^<> ]*[a-zA-Z0-9])') # Org-Babel BEGIN_BLOCK_RE = re.compile(r"^\s*#\+BEGIN_(?P[^ ]+)(?P.*)$", re.I) From 423d6f98420f01faf856329d7ab8e690c0aba2fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Fri, 22 Mar 2024 01:54:46 +0100 Subject: [PATCH 2/2] Fix multiline specifications of TODO properties. --- org_rw/org_rw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org_rw/org_rw.py b/org_rw/org_rw.py index 3217430..c0a1244 100644 --- a/org_rw/org_rw.py +++ b/org_rw/org_rw.py @@ -1871,7 +1871,7 @@ class OrgDoc: for keyword in keywords: 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.done_keywords = re.sub(r"\s{2,}", " ", done_kws.strip()).split()