diff --git a/lisp/org-exp.el b/lisp/org-exp.el index ad80eef24..b69ddf5aa 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -1708,11 +1708,11 @@ table line. If it is a link, add it to the line containing the link." (remove-text-properties (point-min) (point-max) '(org-caption nil org-attributes nil)) (let ((case-fold-search t) - (re (concat "^#\\+caption:[ \t]+\\(.*\\)" + (re (concat "^[ \t]*#\\+caption:[ \t]+\\(.*\\)" "\\|" - "^#\\+attr_" (symbol-name backend) ":[ \t]+\\(.*\\)" + "^[ \t]*#\\+attr_" (symbol-name backend) ":[ \t]+\\(.*\\)" "\\|" - "^#\\+label:[ \t]+\\(.*\\)" + "^[ \t]*#\\+label:[ \t]+\\(.*\\)" "\\|" "^[ \t]*|[^-]" "\\|" diff --git a/lisp/org.el b/lisp/org.el index 5861f1d47..d36288a95 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4245,6 +4245,12 @@ will be prompted for." beg (match-end 0) '(font-lock-fontified t face org-meta-line)) t) + ((or (member dc1 '("caption:" "label:")) + (and (match-end 4) (equal dc3 "attr"))) + (add-text-properties + beg (match-end 0) + '(font-lock-fontified t face org-meta-line)) + t) (t nil)))))) (defun org-activate-angle-links (limit)