From 48120565a3793e777d9370578076c3cbe4953b4b Mon Sep 17 00:00:00 2001 From: "Jakob L. Kreuze" Date: Wed, 1 May 2019 11:49:27 -0400 Subject: Remove replacement for 'ox-html-src-block --- ox-haunt.el | 45 --------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/ox-haunt.el b/ox-haunt.el index 8cbb609..b09ea94 100644 --- a/ox-haunt.el +++ b/ox-haunt.el @@ -42,7 +42,6 @@ (org-open-file (ox-haunt-export-to-html nil s v b))))))) :translate-alist '((link . ox-haunt-link) - (src-block . ox-haunt-src-block) (template . ox-haunt-template)) :options-alist '((:tags "TAGS" nil nil) @@ -74,50 +73,6 @@ valid executable." (unless (file-directory-p dest-path) (user-error "The HAUNT_BASE_DIR property must name a directory"))) -;; From the W3 HTML 5.2 Specification: -;; -;; "Authors who wish to mark elements with the language used, e.g., so -;; that syntax highlighting scripts can use the right rules, can use the class -;; attribute, e.g., by adding a class prefixed with "language-" to the element." -(defun ox-haunt-src-block (src-block _contents info) - "Transcode a SRC-BLOCK element from Org to HTML." - (if (org-export-read-attribute :attr_html src-block :textarea) - (org-html--textarea-block src-block) - (let* ((lang (org-element-property :language src-block)) - (code (org-html-format-code src-block info)) - (label (let ((lbl (and (org-element-property :name src-block) - (org-export-get-reference src-block info)))) - (if lbl (format " id=\"%s\"" lbl) ""))) - (klipsify (and (plist-get info :html-klipsify-src) - (member lang '("javascript" "js" - "ruby" "scheme" "clojure" "php" "html"))))) - (if (not lang) (format "
\n%s
" label code) - (format "
\n%s%s\n
" - ;; Build caption. - (let ((caption (org-export-get-caption src-block))) - (if (not caption) "" - (let ((listing-number - (format - "%s " - (format - (org-html--translate "Listing %d:" info) - (org-export-get-ordinal - src-block info nil #'org-html--has-caption-p))))) - (format "" - listing-number - (org-trim (org-export-data caption info)))))) - ;; Contents. - (if klipsify - (format "
%s
" - lang - label - (if (string= lang "html") - " data-editor-type=\"html\"" - "") - code) - (format "
%s
" - lang label code))))))) - (defun ox-haunt-link (link desc info) "Transcode a LINK object from Org to HTML." (let* ((orig-path (org-element-property :path link)) -- cgit v1.3