From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Mackenzie Subject: [PATCH] ox-confluence.el: Blank org table cells[...] Date: Mon, 17 Apr 2017 00:00:39 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1141a4cc95f9dd054d54d55e Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57702) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1czxqE-0005Km-4x for emacs-orgmode@gnu.org; Mon, 17 Apr 2017 00:00:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1czxqD-0003Ap-44 for emacs-orgmode@gnu.org; Mon, 17 Apr 2017 00:00:42 -0400 Received: from mail-oi0-x233.google.com ([2607:f8b0:4003:c06::233]:36194) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1czxqC-0003Ak-SP for emacs-orgmode@gnu.org; Mon, 17 Apr 2017 00:00:41 -0400 Received: by mail-oi0-x233.google.com with SMTP id r203so131766286oib.3 for ; Sun, 16 Apr 2017 21:00:40 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --001a1141a4cc95f9dd054d54d55e Content-Type: text/plain; charset=UTF-8 First post.. Disclaimer, I have no idea what I'm doing. (Don't know lisp, don't know how to use git format-patch correctly(?), etc. Fixed this for myself and wanted to try my hand at submitting it. If I did a terrible job, let me know and I'll try to remedy. Changelog message explains adequately I hope. --- >From ead5f09134e64794737b9de6913540f9b8fd52da Mon Sep 17 00:00:00 2001 From: Stephen Mackenzie Date: Sun, 16 Apr 2017 23:37:40 -0400 Subject: [PATCH] ox-confluence.el: Blank org table cells produce required whitespace * contrib/lisp/ox-confluence.el (org-confluence-table-cell): Adds blank space in empty org 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 --- contrib/lisp/ox-confluence.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/lisp/ox-confluence.el b/contrib/lisp/ox-confluence.el index a9fac5e..ff8c283 100644 --- a/contrib/lisp/ox-confluence.el +++ b/contrib/lisp/ox-confluence.el @@ -171,8 +171,10 @@ a communication channel." (defun org-confluence-table-cell (table-cell contents info) (let ((table-row (org-export-get-parent table-cell))) (concat - (and (org-export-table-row-starts-header-p table-row info) "|") - " " contents "|"))) + (when (org-export-table-row-starts-header-p table-row info) + "|") + (cond ((equal (length contents) 0) " ") + (t (format "%s" contents))) "|"))) (defun org-confluence-template (contents info) (let ((depth (plist-get info :with-toc))) -- 2.10.0.windows.1 --001a1141a4cc95f9dd054d54d55e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Fi= rst post..
Dis= claimer, I have no idea what I'm doing. (Don't know lisp, don't= know how to use git format-patch correctly(?), etc.
Fixed this for myself and wanted to = try my hand at submitting it.
If I did a terrible job, let me know and I'll try to re= medy.
Changelo= g message explains adequately I hope.

---

From ead5f09134e64794737b9de6913540f9b8fd52da Mon Sep= 17 00:00:00 2001
From: Stephen Mackenzie <max= nbk@gmail.com>
Date: Sun, 16 Apr 2017 23:37:40 -0400
Subject: [PATCH] ox-confluence.e= l: Blank org table cells produce required=C2=A0whitespace

* contrib/lisp/ox-confluence.el (org-confluence-table-cell):=
Adds blank space= in empty org table cell such that confluence
tables do not skip empty entries and pr= oduce erroneous table headers.

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

TINYCHANGE
---
=C2=A0contrib/lisp/ox-confluence.el | 6 ++++--
=
=C2=A01 file changed, = 4 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/ox-confluence.el b/contrib/lisp/= ox-confluence.el
index a9fac5e..ff8c283 100644
--- a/contrib/lisp/ox-confluence.el
=
+++ b/contrib/lisp/ox-= confluence.el
@@ -171,8 +171,10 @@ a communication channel."
=C2=A0(defun org-confluence-t= able-cell =C2=A0(table-cell contents info)
=C2=A0 =C2=A0(let ((table-row (org-export-= get-parent table-cell)))
=C2=A0 =C2=A0 =C2=A0(concat
- =C2=A0 =C2=A0 (and (org-export-table-row= -starts-header-p table-row info) "|")
- =C2=A0 =C2=A0 " " content= s "|")))
+ =C2=A0 =C2=A0 (when (org-export-table-row-starts-header-p table-= row info)
= + =C2=A0 =C2=A0 =C2=A0 "|")
+ =C2=A0 =C2=A0 (cond ((equal (length contents)= 0) " ")
+ =C2=A0 =C2=A0 =C2=A0 (t (format "%s" contents))) "= ;|")))

=C2= =A0(defun org-confluence-template (contents info)
=C2=A0 =C2=A0(let ((depth (plist-ge= t info :with-toc)))
--
2.10.0.windows.1


--001a1141a4cc95f9dd054d54d55e--