branch: externals/org
commit f2ec3c2eb58cc208f5159ca689b1aab1967b38ff
Author: Nikolaos Chatzikonstantinou <[email protected]>
Commit: Ihor Radchenko <[email protected]>
ox-html: Always wrap exported src block with <code> tag
* lisp/org/ox-html.el (org-html-src-block): Add HTML code element inside
pre element for Org source blocks exported to HTML.
* etc/ORG-NEWS (HTML export wraps ~<code>~ around all the exported src
blocks):
Announce the change.
---
etc/ORG-NEWS | 9 +++++++++
lisp/ox-html.el | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index cd1a4cb9ad..a2c01979fe 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -479,6 +479,15 @@ capture ~:tree-type~ options]], the internal variable
undocumented helper function ~org-datetree-insert-line~.
** Miscellaneous
+*** HTML export wraps ~<code>~ around all the exported src blocks
+
+HTML export always uses ~<pre>~ tag around exported src blocks.
+In addition, previously, HTML export used ~<code>~ tag around src
+blocks when ~org-html-klipsify-src~ is non-nil.
+
+Now, both ~<pre>~ and ~<code>~ tags are *always* wrapped around the
+export src blocks.
+
*** ~org-element-org-data-parser~ now returns syntax node with ~:pre-blank~
property
Previously, parsing ~org-data~ syntax node did not record information
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 026a937359..0ed16eb003 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -3709,7 +3709,7 @@ contextual information."
" data-editor-type=\"html\""
"")
code)
- (format "<pre class=\"src src-%s\"%s>%s</pre>"
+ (format "<pre class=\"src src-%s\"%s><code>%s</code></pre>"
;; Lang being nil is OK.
lang label code))))))