From 791471a5f28723f5d3b34a9345795e0f2902b9b6 Mon Sep 17 00:00:00 2001 Message-Id: <791471a5f28723f5d3b34a9345795e0f2902b9b6.1619957998.git.yantar92@gmail.com> From: Ihor Radchenko Date: Sun, 2 May 2021 20:16:44 +0800 Subject: [PATCH] Fix description list item regexp when fontifying "*" items * lisp/org.el (org-set-font-lock-defaults): Avoid fontifying headlines with "::" as description list items. Lists can start with "*", but "*" must not be at the beginning of line. Old regexp did not require whitespace before "*" in description list items. --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 5cc37a57e..53ff5d463 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5582,7 +5582,7 @@ (defun org-set-font-lock-defaults () '("\\[\\([0-9]*%\\)\\]\\|\\[\\([0-9]*\\)/\\([0-9]*\\)\\]" (0 (org-get-checkbox-statistics-face) prepend))) ;; Description list items - '("^[ \t]*[-+*][ \t]+\\(.*?[ \t]+::\\)\\([ \t]+\\|$\\)" + '("\\(?:^[ \t]*[-+]\\|^[ \t]+[*]\\)[ \t]+\\(.*?[ \t]+::\\)\\([ \t]+\\|$\\)" 1 'org-list-dt prepend) ;; Inline export snippets '("\\(@@\\)\\([a-z-]+:\\).*?\\(@@\\)" -- 2.26.3