all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] ox-html.el: Add lang attribute to html tag
@ 2015-11-30  6:27 Ruben Maher
  2015-11-30 21:07 ` Ruben Maher
  0 siblings, 1 reply; 5+ messages in thread
From: Ruben Maher @ 2015-11-30  6:27 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Ruben Maher

* lisp/ox-html.el (org-html-template): Add lang attribute to exported
  html tag.  Some features of the CSS Text Module (Level 3) require this
  attribute to be present (for example, so that the browser knows how to
  hyphenate the text). For more info, please take a look here:
  https://drafts.csswg.org/css-text-3/#languages
---
 lisp/ox-html.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index effd387..074cced 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -1911,10 +1911,12 @@ holding export options."
    (org-html-doctype info)
    "\n"
    (concat "<html"
-	   (when (org-html-xhtml-p info)
-	     (format
-	      " xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"%s\" xml:lang=\"%s\""
-	      (plist-get info :language) (plist-get info :language)))
+	   (cond ((org-html-xhtml-p info)
+		  (format
+		   " xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"%s\" xml:lang=\"%s\""
+		   (plist-get info :language) (plist-get info :language)))
+		 ((org-html-html5-p info)
+		  (format " lang=\"%s\"" (plist-get info :language))))
 	   ">\n")
    "<head>\n"
    (org-html--build-meta-info info)
-- 
2.6.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-12-02  6:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-30  6:27 [PATCH] ox-html.el: Add lang attribute to html tag Ruben Maher
2015-11-30 21:07 ` Ruben Maher
2015-11-30 21:07   ` Ruben Maher
2015-12-01 22:37     ` Nicolas Goaziou
2015-12-02  6:03       ` Ruben Maher

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.