;;;; Src Code
(defun org-e-html-fontify-code (code lang)
+ "Color CODE with htmlize library.
+CODE is a string representing the source code to colorize. LANG
+is the language used for CODE, as a string, or nil."
(when code
(cond
;; Case 1: No lang. Possibly an example block.
(insert code)
;; Switch to language-specific mode.
(funcall lang-mode)
+ ;; "Org" as language. Be sure to disclose
+ ;; everything when activating the major mode.
+ (when (eq lang-mode 'org-mode) (org-cycle '(64)))
;; Fontify buffer.
(font-lock-fontify-buffer)
;; Remove formatting on newline characters.
(format "%%%ds: "
(length (number-to-string (+ code-length num-start))))))
(code (org-e-html-fontify-code code lang)))
- (assert (= code-length (length (org-split-string code "\n"))))
(org-export-format-code
code
(lambda (loc line-num ref)
(match-string 1 formula-link)))))
(t latex-frag))))
+
;;;; Line Break
(defun org-e-html-line-break (line-break contents info)
(funcall table-column-specs table info)
contents)))))
+
;;;; Target
(defun org-e-html-target (target contents info)
\f
-
;;; Filter Functions
(defun org-e-html-final-function (contents backend info)
(buffer-substring-no-properties (point-min) (point-max)))))
+\f
;;; End-user functions
;;;###autoload