From 7596530cb0b59aee5060d333c9ecd0ece6dc6374 Mon Sep 17 00:00:00 2001 From: Nicolas Berthier Date: Fri, 13 Jun 2014 16:39:18 +0200 Subject: [PATCH 2/3] ox-html: 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 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 22d0b04..a730984 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -2411,7 +2411,13 @@ 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)))))) + (format "%s" lang label code)))) ;;;; Inlinetask -- 2.0.0.rc4