From 113300ed2c66cca10624e6d7bf5ff0a72e05653a Mon Sep 17 00:00:00 2001 From: Mark Meyer Date: Fri, 14 Apr 2017 09:00:26 +0200 Subject: [PATCH] Fix xhtml export ox-epub would under certain conditions generate invalid xhtml, this change should fix these conditions. --- ox-epub.el | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/ox-epub.el b/ox-epub.el index a7df411..825411b 100644 --- a/ox-epub.el +++ b/ox-epub.el @@ -45,6 +45,8 @@ (require 'ox-html) (require 'org-element) +org-export-options-alist + (org-export-define-derived-backend 'epub 'html :options-alist '((:epub-uid "UID" nil nil t) @@ -53,7 +55,8 @@ (:epub-publisher "Publisher" nil nil t) (:epub-rights "License" nil nil t) (:epub-style "EPUBSTYLE" nil nil t) - (:epub-cover "EPUBCOVER" nil nil t)) + (:epub-cover "EPUBCOVER" nil nil t) + (:html-doctype "HTML_DOCTYPE" nil "xhtml" t)) :translate-alist '((template . org-epub-template) @@ -359,6 +362,7 @@ holding export options." ">\n") "\n" + (org-html--build-meta-info info) (when (plist-get info :html-head-include-default-style) "\n") (when (plist-get info :epub-style) @@ -377,21 +381,16 @@ holding export options." ;; Document title. (when (plist-get info :with-title) (let ((title (plist-get info :title)) - (subtitle (plist-get info :subtitle)) - (html5-fancy (org-html--html5-fancy-p info))) + (subtitle (plist-get info :subtitle))) (when title (format - (if html5-fancy - "
\n

%s

\n%s
" - "

%s%s

\n") + "

%s%Es

\n") (org-export-data title info) (if subtitle (format - (if html5-fancy - "

%s

\n" - "\n
\n%s\n") + "

%s

\n" (org-export-data subtitle info)) - ""))))) + "")))) contents "" ; (format "\n" (nth 1 (assq 'content (plist-get info :html-divs))))