mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-13 18:40:06 +00:00
Add language-specific class to source code examples.
This commit is contained in:
parent
b24a83f395
commit
c780c3e550
|
@ -2008,7 +2008,8 @@ backends, it converts the segment into an EXAMPLE segment."
|
|||
(org-export-htmlize-region-for-paste
|
||||
(point-min) (point-max)))))
|
||||
(if (string-match "<pre\\([^>]*\\)>\n?" htmltext)
|
||||
(setq htmltext (replace-match "<pre class=\"src\">"
|
||||
(setq htmltext (replace-match
|
||||
(format "<pre class=\"src src-%s\">" lang)
|
||||
t t htmltext)))
|
||||
(concat "#+BEGIN_HTML\n" htmltext "\n#+END_HTML\n"))))
|
||||
(t
|
||||
|
@ -2937,7 +2938,7 @@ lang=\"%s\" xml:lang=\"%s\">
|
|||
(string-match "^[ \t]*:\\(.*\\)" line))
|
||||
(when (not infixed)
|
||||
(setq infixed t)
|
||||
(insert "<pre>\n"))
|
||||
(insert "<pre class=\"example\">\n"))
|
||||
(insert (org-html-protect (match-string 1 line)) "\n")
|
||||
(when (or (not lines)
|
||||
(not (string-match "^[ \t]*\\(:.*\\)"
|
||||
|
|
Loading…
Reference in a new issue