emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [patch][ox-html] Stylistic changes
@ 2014-03-16  0:33 Rasmus
  2014-03-16  9:59 ` Nicolas Goaziou
  0 siblings, 1 reply; 10+ messages in thread
From: Rasmus @ 2014-03-16  0:33 UTC (permalink / raw)
  To: emacs-orgmode

[-- 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
   '(("\\\\-" . "&#x00ad;")		; 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
-  '(("\\\\-" . "&#x00ad;")		; shy
-    ("---\\([^-]\\)" . "&#x2014;\\1")	; mdash
-    ("--\\([^-]\\)" . "&#x2013;\\1")	; ndash
-    ("\\.\\.\\." . "&#x2026;"))		; hellip
+  '(("\\\\-" . "&shy;")		; shy
+    ("---\\([^-]\\)" . "&mdash;\\1")	; mdash
+    ("--\\([^-]\\)" . "&ndash;\\1")	; ndash
+    ("\\.\\.\\." . "&hellip;"))		; hellip
   "Regular expressions for special string conversion.")
 
 (defconst org-html-scripts
-- 
1.9.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-03-19 14:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-16  0:33 [patch][ox-html] Stylistic changes Rasmus
2014-03-16  9:59 ` 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

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).