From 2ce230d0dda6869b4d91a4a27d40d62fdb0593d2 Mon Sep 17 00:00:00 2001 From: Nicolas Berthier Date: Fri, 13 Jun 2014 16:39:18 +0200 Subject: [PATCH 2/2] ox-html.el: Support for exporting inline source code to HTML * lisp/ox-html.el (org-html-inline-src-block): support for exporting inline source code to HTML. --- lisp/ox-html.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 762e1dc..7ece2a9 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -2482,7 +2482,17 @@ CONTENTS holds the contents of the item. INFO is a plist holding contextual information." (let* ((org-lang (org-element-property :language inline-src-block)) (code (org-element-property :value inline-src-block))) - (error "Cannot export inline src block"))) + (let ((lang (org-element-property :language inline-src-block)) + (code (org-html-format-code inline-src-block info)) + (label (let ((lbl (org-element-property :name inline-src-block))) + (if (not lbl) "" + (format " id=\"%s\"" + (org-export-solidify-link-text lbl)))))) + (if lang + (format "%s" + lang label code) + (format "\n%s" + label code))))) ;;;; Inlinetask -- 2.0.0.rc4