mirror of https://github.com/yjwen/org-reveal.git
Merge pull request #211 from vatai/master
Add attributes to the <code> tag
This commit is contained in:
commit
8ca4e8745b
|
@ -923,6 +923,8 @@ contextual information."
|
||||||
#'buffer-substring))
|
#'buffer-substring))
|
||||||
(org-html-format-code src-block info))))
|
(org-html-format-code src-block info))))
|
||||||
(frag (org-export-read-attribute :attr_reveal src-block :frag))
|
(frag (org-export-read-attribute :attr_reveal src-block :frag))
|
||||||
|
(code-attribs (or (org-export-read-attribute
|
||||||
|
:attr_reveal src-block :code_attribs) ""))
|
||||||
(label (let ((lbl (org-element-property :name src-block)))
|
(label (let ((lbl (org-element-property :name src-block)))
|
||||||
(if (not lbl) ""
|
(if (not lbl) ""
|
||||||
(format " id=\"%s\"" lbl)))))
|
(format " id=\"%s\"" lbl)))))
|
||||||
|
@ -937,9 +939,9 @@ contextual information."
|
||||||
(format "<label class=\"org-src-name\">%s</label>"
|
(format "<label class=\"org-src-name\">%s</label>"
|
||||||
(org-export-data caption info)))
|
(org-export-data caption info)))
|
||||||
(if use-highlight
|
(if use-highlight
|
||||||
(format "\n<pre%s%s><code class=\"%s\">%s</code></pre>"
|
(format "\n<pre%s%s><code class=\"%s\" %s>%s</code></pre>"
|
||||||
(or (frag-class frag info) "")
|
(or (frag-class frag info) "")
|
||||||
label lang code)
|
label lang code-attribs code)
|
||||||
(format "\n<pre %s%s>%s</pre>"
|
(format "\n<pre %s%s>%s</pre>"
|
||||||
(or (frag-class frag info)
|
(or (frag-class frag info)
|
||||||
(format " class=\"src src-%s\"" lang))
|
(format " class=\"src src-%s\"" lang))
|
||||||
|
|
Loading…
Reference in New Issue