From: Tom Gillespie <tgbugs@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Cc: TEC <tecosaur@gmail.com>
Subject: [PATCH] lisp/ox-html.el: Restore org-svg class
Date: Fri, 30 Jul 2021 20:59:17 -0700 [thread overview]
Message-ID: <CA+G3_PNgGkJf22ZQNUsZbfYZ3OXVTZKeD_J+Jjqcbq_PyBarBg@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 103 bytes --]
Hi,
This patch restores the addition of class="org-svg" to svg images
during html export. Best!
Tom
[-- Attachment #2: 0001-lisp-ox-html.el-Restore-org-svg-class.patch --]
[-- Type: text/x-patch, Size: 1121 bytes --]
From 4363eec0913ccd0d05ecf3d6346208c62d3597f8 Mon Sep 17 00:00:00 2001
From: Tom Gillespie <tgbugs@gmail.com>
Date: Fri, 30 Jul 2021 20:53:07 -0700
Subject: [PATCH] lisp/ox-html.el: Restore org-svg class.
* lisp/ox-html.el (org-html--format-image): Restore org-svg class.
d96e8975791bd3b1a5f8fdb75609d73f134dc831 removed the org-svg class
which is necessary even when using <img> tags otherwise svg images
will render at absurdly large sizes.
---
lisp/ox-html.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index bd6771a76..f25a9731e 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -1707,7 +1707,9 @@ a communication channel."
(org-html-encode-plain-text
(org-find-text-property-in-string 'org-latex-src source))
(file-name-nondirectory source)))
- attributes))
+ (if (string= "svg" (file-name-extension source))
+ (org-combine-plists '(:class "org-svg") attributes '(:fallback nil))
+ attributes)))
info))
(defun org-html--textarea-block (element)
--
2.31.1
next reply other threads:[~2021-07-31 3:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-31 3:59 Tom Gillespie [this message]
2021-09-21 20:36 ` [PATCH] lisp/ox-html.el: Restore org-svg class Tom Gillespie
2021-09-25 21:18 ` Bastien Guerry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+G3_PNgGkJf22ZQNUsZbfYZ3OXVTZKeD_J+Jjqcbq_PyBarBg@mail.gmail.com \
--to=tgbugs@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=tecosaur@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).