[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org ef43642874 1/3: lisp/ox-odt.el (org-odt-item): Fix
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org ef43642874 1/3: lisp/ox-odt.el (org-odt-item): Fix table hack inside nested list |
Date: |
Fri, 5 Apr 2024 06:58:35 -0400 (EDT) |
branch: externals/org
commit ef4364287409b2ae8f20833086bc3ecaab48e2b1
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
lisp/ox-odt.el (org-odt-item): Fix table hack inside nested list
* lisp/ox-odt.el (org-odt-item): When exporting table inside a list,
fix scenario when the table is located inside a sub-list of another
list.
Reported-by: Christian Moe <mail@christianmoe.com>
Link: https://orgmode.org/list/87edxn9z7n.fsf@localhost
---
lisp/ox-odt.el | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 3f1f1a5a8d..3fa51bd0a5 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -1945,7 +1945,16 @@ contextual information."
(format "\n<text:list-item%s>\n%s\n%s"
(if count (format " text:start-value=\"%s\"" count) "")
contents
- (if (org-element-map item 'table #'identity info 'first-match)
+ (if (org-element-map item
+ 'table #'identity info 'first-match
+ ;; Ignore tables inside sub-lists.
+ '(plain-list))
+ ;; `org-odt-table' will splice forced list ending (all
+ ;; the way up to the topmost list parent), table, and
+ ;; forced list re-opening in the middle of the item,
+ ;; marking text after table with <text:list-header>
+ ;; So, we must match close </text:list-header> instead
+ ;; of the original </text:list-item>.
"</text:list-header>"
"</text:list-item>"))))