diff options
author | Nicolas Berthier <nberth@member.fsf.org> | 2017-05-15 16:35:52 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-05-15 18:28:34 +0200 |
commit | 2c9f6fcef9dce2ace56e542f49f5f289dd741ce7 (patch) | |
tree | 7d4e904167396de4053503769cd848286edc0cca | |
parent | 3c7ef9f8e853e10135dec38083bca0c8eff5e1b3 (diff) | |
download | org-mode-2c9f6fcef9dce2ace56e542f49f5f289dd741ce7.tar.gz |
Fontify inline source blocks when exporting to HTML
* lisp/ox-html.el (org-html-inline-src-block): Fontify inline source
blocks.
-rw-r--r-- | lisp/ox-html.el | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 224b577..9c0ba65 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -2624,12 +2624,14 @@ CONTENTS is nil. INFO is a plist holding contextual information." "Transcode an INLINE-SRC-BLOCK element from Org to HTML. CONTENTS holds the contents of the item. INFO is a plist holding contextual information." - (let ((lang (org-element-property :language inline-src-block)) - (code (org-element-property :value inline-src-block)) - (label - (let ((lbl (and (org-element-property :name inline-src-block) - (org-export-get-reference inline-src-block info)))) - (if (not lbl) "" (format " id=\"%s\"" lbl))))) + (let* ((lang (org-element-property :language inline-src-block)) + (code (org-html-fontify-code + (org-element-property :value inline-src-block) + lang)) + (label + (let ((lbl (and (org-element-property :name inline-src-block) + (org-export-get-reference inline-src-block info)))) + (if (not lbl) "" (format " id=\"%s\"" lbl))))) (format "<code class=\"src src-%s\"%s>%s</code>" lang label code))) ;;;; Inlinetask |