branch: externals/org-modern commit 1977053f105762b81228c4cf66b00957213f3681 Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
Improve fontification rules --- org-modern.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/org-modern.el b/org-modern.el index e262f82892..3862d9dbf9 100644 --- a/org-modern.el +++ b/org-modern.el @@ -712,11 +712,16 @@ the font.") (1 '(face org-modern-statistics) t) (2 ,(if org-modern-progress '(org-modern--progress) ''(face nil display " "))) (6 '(face nil display " "))))) - '((org-fontify-meta-lines-and-blocks)) ;; Ensure that blocks are properly fontified (when org-modern-tag - `((,(concat - "^\\(?:\\*+.*?\\|^[ \t]*#\\+\\(?:filetags\\|FILETAGS\\):\\)\\( +\\)\\(:\\(?:" - org-tag-re ":\\)+\\)[ \t]*$") + `((,(concat "^\\*+.*?\\( \\)\\(:\\(?:" org-tag-re ":\\)+\\)[ \t]*$") + (0 (org-modern--tag))))) + ;; Ensure that blocks are properly fontified, source blocks etc. This + ;; fontification rule must come late such that org-modern does not interfere + ;; with source fontification. + '((org-fontify-meta-lines-and-blocks)) + (when org-modern-tag + `((,(concat "^[ \t]*#\\+\\(?:filetags\\|FILETAGS\\):\\( +\\)\\(:\\(?:" + org-tag-re ":\\)+\\)[ \t]*$") (0 (org-modern--tag))))) (when org-modern-keyword `(("^[ \t]*\\(#\\+\\)\\([^: \t\n]+\\):"