From 7bc578c6add33a883127b42bad60c20615a9bc6a Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Sat, 27 Jun 2009 13:59:59 +0200 Subject: [PATCH] HTML export: Fix export bug with ID links --- lisp/org-html.el | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lisp/org-html.el b/lisp/org-html.el index 3d718a715..1cc9e448c 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -1012,16 +1012,17 @@ lang=\"%s\" xml:lang=\"%s\"> (setq id-file (org-id-find-id-file path))) ;; This is an id: link to another file (if it was the same file, ;; it would have become an internal link...) - (setq id-file (file-relative-name - id-file (file-name-directory org-current-export-file))) - (setq id-file (concat (file-name-sans-extension id-file) - "." html-extension)) - (setq rpl (concat "" - (org-export-html-format-desc desc) - ""))) + (save-match-data + (setq id-file (file-relative-name + id-file (file-name-directory org-current-export-file))) + (setq id-file (concat (file-name-sans-extension id-file) + "." html-extension)) + (setq rpl (concat "" + (org-export-html-format-desc desc) + "")))) ((member type '("http" "https")) ;; standard URL, just check if we need to inline an image (if (and (or (eq t org-export-html-inline-images)