Created
July 29, 2019 18:36
-
-
Save takaxp/0c928d6f25484bb7a1f02df27a2e04bc to your computer and use it in GitHub Desktop.
To avid unexpected code formatting in exported HTML file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lisp/ox-html.el b/lisp/ox-html.el | |
index 757006321..c8fa3fda4 100644 | |
--- a/lisp/ox-html.el | |
+++ b/lisp/ox-html.el | |
@@ -2256,11 +2256,10 @@ line of code." | |
(format "<span class=\"linenr\">%s</span>" | |
(format num-fmt line-num))) | |
;; Transcoded src line. | |
- (format "<code%s>%s</code>" | |
- (if num-start | |
- (format " data-ox-html-linenr=\"%s\"" line-num) | |
- "") | |
- loc) | |
+ (if num-start | |
+ (format "<code data-ox-html-linenr=\"%s\">%s</code>" | |
+ line-num loc) | |
+ loc) | |
;; Add label, if needed. | |
(when (and ref retain-labels) (format " (%s)" ref)))) | |
;; Mark transcoded line as an anchor, if needed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment