[O] Re: [Orgmode] [REGRESSION] org-html.el (targets)
Jambunathan K writes: > I am attaching the bug.org file and the html exports as done by git > versions 048f32 (approx a month old) and 77c278 (very recent). Hi, Here's a patch that fixes this issue. >From cd423f908de55a2379c4476c0da8922968786e64 Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Mon, 7 Mar 2011 17:12:46 +0100 Subject: [PATCH] org-html.el: bug that prevents some target to be rendered correctly. --- lisp/org-exp.el |2 +- lisp/org-html.el | 10 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/org-exp.el b/lisp/org-exp.el index ae7bdcf..f22eeba 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -2062,7 +2062,7 @@ can work correctly." (let* ((rtn (mapconcat 'identity - (org-split-string s "[^a-zA-Z0-9_\\.-]+") "--")) + (org-split-string s "[^a-zA-Z0-9_\\.-]+") "-")) (a (assoc rtn alist))) (or (cdr a) rtn diff --git a/lisp/org-html.el b/lisp/org-html.el index eb4b199..8fe8029 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -2181,12 +2181,12 @@ that uses these same face definitions." (defun org-html-protect (s) "Convert characters to HTML equivalent. Possible conversions are set in `org-export-html-protect-char-alist'." - (let ((start 0) - (cl org-export-html-protect-char-alist) c) + (let ((cl org-export-html-protect-char-alist) c) (while (setq c (pop cl)) - (while (string-match (car c) s start) - (setq s (replace-match (cdr c) t t s) - start (1+ (match-beginning 0) + (let ((start 0)) + (while (string-match (car c) s start) + (setq s (replace-match (cdr c) t t s) + start (match-beginning 0) s)) (defun org-html-expand (string) -- 1.7.1 Best regards, -- Manuel Giraud
[Orgmode] [REGRESSION] org-html.el (targets)
I am attaching the bug.org file and the html exports as done by git versions 048f32 (approx a month old) and 77c278 (very recent). Put the html file in nxml-mode and do a C-c C-n to check for validation errors. Click on the associated links in the html browser and you would notice that there is a regression. I don't haven't tried git bisection. I hope someone fixes these regressions & malformed htmls. Jambunathan K. #+TITLE: Testfile for OpenDocumentText Exporter #+AUTHOR:Jambunathan K #+EMAIL: kjambunat...@gmail.com #+DATE: 2010-10-26 Sat #+LANGUAGE: en #+OPTIONS: H:3 num:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: LaTeX:dvipng #+STARTUP: inlineimages showall * Links ** Targets *** Fuzzy Target *** Target with CUSTOMID :PROPERTIES: :CUSTOM_ID: aabbccddeeff :END: *** Dedicated Target Style1 # <> *** Dedicated Target Style2 There is a dedicated target at the end of this sentence - <>. *** <<>> ** References *** References to Fuzzy Target This is a link to [[Fuzzy Target]]. *** References to CUSTOMID links This is a link to [[#aabbccddeeff][Target with CUSTOMID]]. This is nodesc link to [[#aabbccddeeff]]. *** References to Dedicated Target There is a link to nodesc [[Dedicated Target]] here. There is a link to [[Dedicated%20Target][Jump to Dedicated Target]] here. There is a link to [[Dedicated%20Target1][Dedicated Target1]] here. *** References to Radioed Links This section has references to Radioed Target. One more reference to Radioed Target. * Tables ** A simple Orgmode Table | EST | New York | -5:00 | | IST | Madras | +5:30 | | AST | Bahrain | +3:00 | ** A formatted Orgmode Table #+CAPTION: An Example Table #+LABEL: table:10 | Labels | Column1| Column2 | Column3 | |++---+--| | / | < | > | <> | | | || | | Row1Row1Row1 Right | R1C1 Left | R1C2R1C2R1C2 Centered | R1C3 Right | |++---+--| | Row2Row2 | R2C1R2C1 | R2C2R2C2 | R2C3R2C3R2C3R2C3 | ||| | | |++---+--| ** Table.el Table with no Spanning +---+---+ |Term |Percentage | +---+---+ |Quarter|25%| |One-Fourth | | +---+---+ |Half |50%| |One-by-Two | | +---+---+ |Three-Quarters |75%| |Three-Fourths | | +---+---+ |Full |100% | |Whole | | +---+---+ ** COMMENT Table.el Table with Spanning +--+-+--+ |Name |cmdcalls |Percentage| +--+ +--+ |rgb |93 534 |46% | +--+ +--+ |Xah |82 090 |40% | +--+ +--+ |total |203118 |100% | +--+-+--+ ** COMMENT Another Table.el Table with Spanning +--+--+ | Header 1 | Header 2 | +--+--+ | R1 C1-2 | +--+--+ | R2 C1| R2-3 C2 | + +--+ | | | +--+--+ * Table Referenced Please refer to \ref{table:10} for further information. Title: Testfile for OpenDocumentText Exporter Testfile for OpenDocumentText Exporter Table of Contents 1 Links 1.1 Targets 1.1.1 Fuzzy Target 1.1.2 Target with CUSTOMID 1.1.3 Dedicated Target Style1 1.1.4 Dedicated Target Style2 1.1.5 Radioed Target 1.2 References 1.2.1 References to Fuzzy Target 1.2.2 References to CUSTOMID links 1.2.3 References to Dedicated Target 1.2.4 References to Radioed Links 2 Tables 2.1 A simple Orgmode Table 2.2 A formatted Orgmode Table 2.3 Table.el Table with no Spanning 3 Table Referenced 1 Links 1.1 Targets 1.1.1 Fuzzy Target 1.1.2 Target with CUSTOMID 1.1.3 Dedicated Target Style1 1.1.4 Dedicated Target Style2 There is a dedicated target at the end of this sentence - Dedicated Target1 . 1.1.5 Radioed Target 1.2 References 1.2.1 References to Fuzzy Target This is a link to Fuzzy Target. 1.2.2 References to CUSTOMID links This i