emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org af0fcb6: element: Allow citations in table cells


From: ELPA Syncer
Subject: [elpa] externals/org af0fcb6: element: Allow citations in table cells
Date: Wed, 28 Jul 2021 04:57:13 -0400 (EDT)

branch: externals/org
commit af0fcb68331e0b2ab0c755c80c64e63479419e66
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Commit: Nicolas Goaziou <mail@nicolasgoaziou.fr>

    element: Allow citations in table cells
    
    * lisp/org-element.el (org-element-object-restrictions): Allow
    citations in table cells.
    * testing/lisp/test-org-element.el (test-org-element/citation-parser):
    Add test.  Remove outdated test.
---
 lisp/org-element.el              |  4 ++--
 testing/lisp/test-org-element.el | 11 ++++++-----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index a94f3e3..006e75a 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 663a8f6..ea9f97a 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 "| <point>[cite:@key] |"
+        (org-element-type (org-element-context))))))
 
 
 ;;;; Citation Reference



reply via email to

[Prev in Thread] Current Thread [Next in Thread]