[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Bug: unconverted dashes in HTML export
From: |
Thomas Morgan |
Subject: |
[O] Bug: unconverted dashes in HTML export |
Date: |
Sat, 01 Feb 2014 17:29:17 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Dear Org mode hackers,
I started Emacs with `emacs -Q -l setup.el test-case.org', then typed
`C-c C-e h o' to export to HTML and open the result. The setup file
(`setup.el'), test case (`test-case.org'), HTML output (`lose.html'),
and a PDF printed by the web browser (`lose.pdf'), are attached.
The test case contains a one-cell table with three hyphens (`---').
I expected this to be converted to an em-dash in the HTML output,
but it remained three hyphens.
A patch fixing the problem is attached, along with the HTML and PDF
produced after the patch was applied (`win.html', `win.pdf').
I started preparing this report last May (sorry for the delay)
but just confirmed the bug again with Org-mode version 8.2.5g
(`release_8.2.5g-663-g24a213' @ `/src/org-mode/lisp/') and GNU Emacs
24.3.1 (`x86_64-unknown-linux-gnu', X toolkit, Xaw3d scroll bars)
of 2013-09-24.
Thanks and best regards,
Thomas
setup.el
Description: application/emacs-lisp
#+TITLE: Bug with unconverted dashes in HTML export
| --- |
Bug with unconverted dashes in HTML export
Author: Thomas Morgan
Created: 2013-05-19 Sun 12:31
Emacs 24.2.1 (Org mode 7.9.2)
Validate XHTML 1.0
lose.pdf
Description: Adobe PDF document
>From bd14cdce80a610a5eadbf563ac12472fbed542a5 Mon Sep 17 00:00:00 2001
From: Thomas Morgan <address@hidden>
Date: Mon, 13 May 2013 11:06:52 +0200
Subject: [PATCH] Convert dashes in HTML export even when at end of string.
* lisp/ox-html.el (org-html-special-string-regexps): Convert dashes
even when at end of string.
---
lisp/ox-html.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 54c6a45..f47e760 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -145,8 +145,8 @@
(defconst org-html-special-string-regexps
'(("\\\\-" . "­") ; shy
- ("---\\([^-]\\)" . "—\\1") ; mdash
- ("--\\([^-]\\)" . "–\\1") ; ndash
+ ("---\\([^-]?\\)" . "—\\1") ; mdash
+ ("--\\([^-]?\\)" . "–\\1") ; ndash
("\\.\\.\\." . "…")) ; hellip
"Regular expressions for special string conversion.")
--
1.7.9.5
Bug with unconverted dashes in HTML export
Author: Thomas Morgan
Created: 2013-05-19 Sun 12:32
Emacs 24.2.1 (Org mode 7.9.2)
Validate XHTML 1.0
win.pdf
Description: Adobe PDF document
- [O] Bug: unconverted dashes in HTML export,
Thomas Morgan <=