Function: org-lint-invalid-image-alignment
org-lint-invalid-image-alignment is a byte-compiled function defined
in org-lint.el.gz.
Signature
(org-lint-invalid-image-alignment AST)
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-lint.el.gz
(defun org-lint-invalid-image-alignment (ast)
(apply
#'nconc
(org-element-map ast 'paragraph
(lambda (p)
(let ((center-re ":center[[:space:]]+\\(\\S-+\\)")
(align-re ":align[[:space:]]+\\(\\S-+\\)")
(keyword-string
(car-safe (org-element-property :attr_org p)))
reports)
(when keyword-string
(when (and (string-match align-re keyword-string)
(not (member (match-string 1 keyword-string)
'("left" "center" "right"))))
(push
(list (org-element-begin p)
(format
"\"%s\" not a supported value for #+ATTR_ORG keyword attribute \":align\"."
(match-string 1 keyword-string)))
reports))
(when (and (string-match center-re keyword-string)
(not (equal (match-string 1 keyword-string) "t")))
(push
(list (org-element-begin p)
(format
"\"%s\" not a supported value for #+ATTR_ORG keyword attribute \":center\"."
(match-string 1 keyword-string)))
reports)))
reports)))))