summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Giraud <manuel.giraud@univ-nantes.fr>2011-03-09 20:06:37 +0000
committerBastien Guerry <bzg@altern.org>2011-03-09 16:37:32 +0100
commit72011fc4073cbf41dde21b1117daf7ace30d6dea (patch)
treea35af59315223bcf98a519a3d0ad723b566635e5
parenteafdbc575b66ec2876634438ece5163bb073d36c (diff)
downloadorg-mode-72011fc4073cbf41dde21b1117daf7ace30d6dea.tar.gz
org-html.el: correct HTML export of dedicated target.
* org-html.el (org-format-org-table-html): fix anchors in HTML export (thanks to <aankhen@gmail.com>) (org-html-protect): fix a bug that prevents some target to be rendered correctly. * org-exp.el (org-solidify-link-text): a single "-" to avoid a "&ndash" rewrite in HTML export later.
-rw-r--r--lisp/org-exp.el2
-rw-r--r--lisp/org-html.el14
2 files changed, 8 insertions, 8 deletions
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 709317a..dff86b6 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 9361af0..c60c90d 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -1996,8 +1996,8 @@ for formatting. This is required for the DocBook exporter."
;; DocBook document, we want to always include the caption to make
;; DocBook XML file valid.
(push (format "<caption>%s</caption>" (or caption "")) html)
- (when label (push (format "<a name=\"%s\" id=\"%s\"></a>" (org-solidify-link-text label) (org-solidify-link-text label))
- html))
+ (when label
+ (setq html-table-tag (org-export-splice-attributes html-table-tag (format "id=\"%s\"" (org-solidify-link-text label)))))
(push html-table-tag html))
(setq html (mapcar
(lambda (x)
@@ -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)