From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: [patch][ox-html] Stylistic changes
Date: Sun, 16 Mar 2014 01:33:12 +0100 [thread overview]
Message-ID: <874n2z3ruf.fsf@gmx.us> (raw)
[-- Attachment #1: Type: text/plain, Size: 563 bytes --]
Hi,
Here's a couple of minor changes for ox-html.
First, I dropped the references to HTML5 hgroup since apparently W3
did the same¹.
Second, for some reason ox-html replaces a couple of entities by
itself—rather than letting org-entities do it—but uses hex references
(or whatever), rather than a "nice" HTML character entity. The second
patch fixes this. (I naively assume that there is not a reason for
not using the pretty references).
—Rasmus
Footnotes:
¹ e.g. http://html5doctor.com/the-hgroup-element/
--
May the Force be with you
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Remove-reference-to-hgroup-in-ox-html.patch --]
[-- Type: text/x-diff, Size: 963 bytes --]
From 8325901e959e16d34546ca7bf74d7efbc8e16825 Mon Sep 17 00:00:00 2001
From: Rasmus <w530@pank.eu>
Date: Sun, 16 Mar 2014 00:36:21 +0100
Subject: [PATCH 1/2] Remove reference to hgroup in ox-html
* ox-html.el (org-html-html5-elements): Drop reference to hgroup.
---
lisp/ox-html.el | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index a8c924f..cb95161 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -169,10 +169,8 @@
"progress" "section" "video")
"New elements in html5.
-<hgroup> is not included because it's currently impossible to
-wrap special blocks around multiple headlines. For other blocks
-that should contain headlines, use the HTML_CONTAINER property on
-the headline itself.")
+For blocks that should contain headlines, use the HTML_CONTAINER
+property on the headline itself.")
(defconst org-html-special-string-regexps
'(("\\\\-" . "­") ; shy
--
1.9.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-Proper-HTML-entities-for-dashes-dots-in-ox-html.patch --]
[-- Type: text/x-diff, Size: 1083 bytes --]
From bd096d2040d4ffaa517466ac85c4e0da08863bec Mon Sep 17 00:00:00 2001
From: Rasmus <w530@pank.eu>
Date: Sun, 16 Mar 2014 00:54:11 +0100
Subject: [PATCH 2/2] Proper HTML entities for dashes, dots in ox-html
* ox-html.el (org-html-special-string-regexps): Use HTML entities.
---
lisp/ox-html.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index cb95161..8e22df6 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -173,10 +173,10 @@ For blocks that should contain headlines, use the HTML_CONTAINER
property on the headline itself.")
(defconst org-html-special-string-regexps
- '(("\\\\-" . "­") ; shy
- ("---\\([^-]\\)" . "—\\1") ; mdash
- ("--\\([^-]\\)" . "–\\1") ; ndash
- ("\\.\\.\\." . "…")) ; hellip
+ '(("\\\\-" . "­") ; shy
+ ("---\\([^-]\\)" . "—\\1") ; mdash
+ ("--\\([^-]\\)" . "–\\1") ; ndash
+ ("\\.\\.\\." . "…")) ; hellip
"Regular expressions for special string conversion.")
(defconst org-html-scripts
--
1.9.0
next reply other threads:[~2014-03-16 0:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-16 0:33 Rasmus [this message]
2014-03-16 9:59 ` [patch][ox-html] Stylistic changes Nicolas Goaziou
2014-03-16 13:06 ` Rasmus
2014-03-17 2:17 ` Bastien
2014-03-17 17:01 ` Rick Frankel
2014-03-17 22:19 ` Rasmus
2014-03-18 0:35 ` Rick Frankel
[not found] ` <874n2w2n62.fsf@gmx.us>
2014-03-18 13:49 ` Rick Frankel
2014-03-18 19:46 ` Rasmus
2014-03-19 14:00 ` Rick Frankel
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874n2z3ruf.fsf@gmx.us \
--to=rasmus@gmx.us \
--cc=emacs-orgmode@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.