Browse Source

ox-confluence.el: Blank table cells produce required whitespace

* contrib/lisp/ox-confluence.el (org-confluence-table-cell): Add blank
space in an empty table cell such that Confluence tables do not skip
empty entries and produce erroneous table headers.

Confluence tables are formatted incorrectly when empty cells
cause `||' to generate the next cell as a table header, skipping
the empty cell.  Empty cells must be formatted as `| |'.

TINYCHANGE
Stephen Mackenzie 8 years ago
parent
commit
166364bc96
1 changed files with 3 additions and 3 deletions
  1. 3 3
      contrib/lisp/ox-confluence.el

+ 3 - 3
contrib/lisp/ox-confluence.el

@@ -148,9 +148,9 @@ a communication channel."
 
 
 (defun org-confluence-table-cell  (table-cell contents info)
 (defun org-confluence-table-cell  (table-cell contents info)
   (let ((table-row (org-export-get-parent table-cell)))
   (let ((table-row (org-export-get-parent table-cell)))
-    (concat
-     (and (org-export-table-row-starts-header-p table-row info) "|")
-     " " contents "|")))
+    (concat (and (org-export-table-row-starts-header-p table-row info) "|")
+	    (if (= (length contents) 0) " " contents)
+	    "|")))
 
 
 (defun org-confluence-template (contents info)
 (defun org-confluence-template (contents info)
   (let ((depth (plist-get info :with-toc)))
   (let ((depth (plist-get info :with-toc)))