summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus <rasmus@gmx.us>2015-02-24 15:13:36 +0100
committerRasmus <rasmus@gmx.us>2015-02-26 15:49:34 +0100
commit398165f5a1d90b89ed40ee8750ccb2072df02113 (patch)
treed7c5228ff07832d45ad09f379b668e07e1c499ad
parentce7b3fc74b5f26d3d4ca6ef200b9466c02f4bacb (diff)
downloadorg-mode-398165f5a1d90b89ed40ee8750ccb2072df02113.tar.gz
ox-odt: Remove unnecessary space when no date
* ox-odt.el (org-odt-template): Remove unnecessary space in header when no date.
-rw-r--r--lisp/ox-odt.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 9fe5e9f..63984f6 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -1553,14 +1553,15 @@ original parsed data. INFO is a plist holding export options."
(timestamp (and (not (cdr date))
(eq (org-element-type (car date)) 'timestamp)
(car date))))
- (concat
- (format "\n<text:p text:style-name=\"%s\">%s</text:p>"
- "OrgSubtitle"
- (if (and (plist-get info :odt-use-date-fields) timestamp)
- (org-odt--format-timestamp (car date))
- (org-export-data (plist-get info :date) info)))
- ;; Separator
- "<text:p text:style-name=\"OrgSubtitle\"/>"))))))
+ (when date
+ (concat
+ (format "\n<text:p text:style-name=\"%s\">%s</text:p>"
+ "OrgSubtitle"
+ (if (and (plist-get info :odt-use-date-fields) timestamp)
+ (org-odt--format-timestamp (car date))
+ (org-export-data date info)))
+ ;; Separator
+ "<text:p text:style-name=\"OrgSubtitle\"/>")))))))
;; Table of Contents
(let* ((with-toc (plist-get info :with-toc))
(depth (and with-toc (if (wholenump with-toc)