From 902e6cea48912bd291c1d3192cb30dc9a1a41fa3 Mon Sep 17 00:00:00 2001 From: Chunyang Xu Date: Thu, 9 Nov 2017 23:43:32 +0800 Subject: [PATCH] ox-html: Allow disabling htmlize * lisp/ox-html.el (org-html-fontify-code): Do it. Disable htmlize by setting org-html-htmlize-output-type to nil. TINYCHANGE --- lisp/ox-html.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 1c3dd8090..d0fe33f2a 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -2158,7 +2158,11 @@ is the language used for CODE, as a string, or nil." ((not lang) ;; Simple transcoding. (org-html-encode-plain-text code)) - ;; Case 2: No htmlize or an inferior version of htmlize + ;; Case 2: plain text explicitly set + ((not org-html-htmlize-output-type) + ;; Simple transcoding. + (org-html-encode-plain-text code)) + ;; Case 3: No htmlize or an inferior version of htmlize ((not (and (or (require 'htmlize nil t) (error "Please install htmlize from https://github.com/hniksic/emacs-htmlize")) (fboundp 'htmlize-region-for-paste))) @@ -2166,10 +2170,6 @@ is the language used for CODE, as a string, or nil." (message "Cannot fontify src block (htmlize.el >= 1.34 required)") ;; Simple transcoding. (org-html-encode-plain-text code)) - ;; Case 3: plain text explicitly set - ((not org-html-htmlize-output-type) - ;; Simple transcoding. - (org-html-encode-plain-text code)) (t ;; Map language (setq lang (or (assoc-default lang org-src-lang-modes) lang)) -- 2.14.2