summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorN. Raghavendra <raghu@hri.res.in>2017-09-19 22:37:02 +0530
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-09-19 22:00:32 +0200
commitdb1dab8abe41eb052aac8428262482f6c3974880 (patch)
treebf48e27a3e2b72031a00ed27f15b297ffa9b0511
parent753f3f2842b5aa24ddefbbeaf05255f6991e6825 (diff)
downloadorg-mode-db1dab8abe41eb052aac8428262482f6c3974880.tar.gz
ox-html.el: Partially revert d5bbf36553
* lisp/ox-html.el (org-html-src-block): Unless klipse is used, export source code blocks as content of `pre' elements, and not as content of `code' children of `pre' elements. Restores the previous way of exporting source code blocks, and fixes the display of language indicators while hovering over the blocks in the exported HTML file, when klipse is not used. (org-html-keep-old-src): Remove it. Not needed because it is now the default, unless klipse is used.
-rw-r--r--lisp/ox-html.el23
1 files changed, 10 insertions, 13 deletions
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index fb8c613..8ce4fb6 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -174,7 +174,6 @@
(:html-klipsify-src nil nil org-html-klipsify-src)
(:html-klipse-css nil nil org-html-klipse-css)
(:html-klipse-js nil nil org-html-klipse-js)
- (:html-klipse-keep-old-src nil nil org-html-keep-old-src)
(:html-klipse-selection-script nil nil org-html-klipse-selection-script)
(:infojs-opt "INFOJS_OPT" nil nil)
;; Redefine regular options.
@@ -1572,12 +1571,6 @@ https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag"
:package-version '(Org . "9.1")
:type 'string)
-(defcustom org-html-keep-old-src nil
- "When non-nil, use <pre class=\"\"> instead of <pre><code class=\"\">."
- :group 'org-export-html
- :package-version '(Org . "9.1")
- :type 'boolean)
-
;;;; Todos
@@ -3402,12 +3395,16 @@ contextual information."
listing-number
(org-trim (org-export-data caption info))))))
;; Contents.
- (let ((open (if org-html-keep-old-src "<pre" "<pre><code"))
- (close (if org-html-keep-old-src "</pre>" "</code></pre>")))
- (format "%s class=\"src src-%s\"%s%s>%s%s"
- open lang label (if (and klipsify (string= lang "html"))
- " data-editor-type=\"html\"" "")
- code close)))))))
+ (if klipsify
+ (format "<pre><code class=\"src src-%s\"%s%s>%s</code></pre>"
+ lang
+ label
+ (if (string= lang "html")
+ " data-editor-type=\"html\""
+ "")
+ code)
+ (format "<pre class=\"src src-%s\"%s>%s</pre>"
+ lang label code)))))))
;;;; Statistics Cookie