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.
This commit is contained in:
Nicolas Berthier 2014-06-13 16:39:18 +02:00 committed by Nicolas Goaziou
parent 795c004396
commit 2ea7bf4042
1 changed files with 7 additions and 1 deletions

View File

@ -2414,7 +2414,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 "<code class=\"src src-%s\"%s>%s</code>" lang label code))))
;;;; Inlinetask