From eacbcce376962e6f57b3413bf486d3bbf502990b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Sun, 15 May 2022 23:39:35 +0200 Subject: [PATCH] Avoid false-positives when detecting headlines. A space should be present after the leading '*' to avoid detection of lines that start with bolded text. --- 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 7ad947d..c006d1d 100644 --- a/org_rw/org_rw.py +++ b/org_rw/org_rw.py @@ -53,7 +53,7 @@ DEFAULT_TODO_KEYWORDS = ["TODO"] DEFAULT_DONE_KEYWORDS = ["DONE"] HEADLINE_TAGS_RE = re.compile(r"((:(\w|[0-9_@#%])+)+:)\s*$") -HEADLINE_RE = re.compile(r"^(?P\*+)(?P\s*)(?P.*?)$") +HEADLINE_RE = re.compile(r"^(?P\*+)(?P\s+)(?P.*?)$") KEYWORDS_RE = re.compile( r"^(?P\s*)#\+(?P[^:\[]+)(\[(?P[^\]]*)\])?:(?P\s*)(?P.*)$" )