Bläddra i källkod

ox-html: Wrap each line of a source block in a code element

* lisp/ox-html.el (org-html-do-format-code): Wrap each line of a source block
in a code element.

This makes it straightforward to add custom decorations to each line
using CSS :before and :after properties.

TINYCHANGE
Nik Clayton 6 år sedan
förälder
incheckning
ded3d27b14
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      lisp/ox-html.el

+ 1 - 1
lisp/ox-html.el

@@ -2255,7 +2255,7 @@ line of code."
 		(format "<span class=\"linenr\">%s</span>"
 			(format num-fmt line-num)))
 	      ;; Transcoded src line.
-	      loc
+	      (format "<code>%s</code>" loc)
 	      ;; Add label, if needed.
 	      (when (and ref retain-labels) (format " (%s)" ref))))
        ;; Mark transcoded line as an anchor, if needed.