diff --git a/lisp/org-element.el b/lisp/org-element.el index a94f3e328..006e75a66 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -372,8 +372,8 @@ Don't modify it, set `org-element-affiliated-keywords' instead.") ;; Ignore inline babel call and inline source block as formulas ;; are possible. Also ignore line breaks and statistics ;; cookies. - (table-cell export-snippet footnote-reference link macro radio-target - target timestamp ,@minimal-set) + (table-cell citation export-snippet footnote-reference link macro + radio-target target timestamp ,@minimal-set) (table-row table-cell) (underline ,@standard-set) (verse-block ,@standard-set))) diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el index 663a8f62b..ea9f97a64 100644 --- a/testing/lisp/test-org-element.el +++ b/testing/lisp/test-org-element.el @@ -528,10 +528,6 @@ Some other text (eq 'citation (org-test-with-temp-text "[cite:@key]" (org-element-type (org-element-context))))) - (should - (eq 'citation - (org-test-with-temp-text "[cite:-@key]" - (org-element-type (org-element-context))))) (should-not (eq 'citation (org-test-with-temp-text "[cite:text]" @@ -582,7 +578,12 @@ Some other text (should (equal '(" common-suffix") (org-test-with-temp-text "[cite: @a; common-suffix ]" - (org-element-property :suffix (org-element-context)))))) + (org-element-property :suffix (org-element-context))))) + ;; Allow citations in a table cell. + (should + (eq 'citation + (org-test-with-temp-text "| [cite:@key] |" + (org-element-type (org-element-context)))))) ;;;; Citation Reference