summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJambunathan K <kjambunathan@gmail.com>2011-11-23 06:01:33 +0530
committerJambunathan K <kjambunathan@gmail.com>2011-11-23 06:01:33 +0530
commite10722c9cd58862bd493b5548811b2a493dbb8cd (patch)
tree6721e9a7ca4f83b0c16cc4b0aabc76528c466469
parent25a0a0212193ecc5e910696301b3a64a51f837e0 (diff)
downloadorg-mode-e10722c9cd58862bd493b5548811b2a493dbb8cd.tar.gz
org-odt.el: Fix a bug wrt label references
* contrib/lisp/org-odt.el (org-odt-fixup-label-references) (org-export-odt-preprocess-label-references): Modified. Workaround for issue reported here: http://lists.gnu.org/archive/html/emacs-orgmode/2011-11/msg00773.html
-rw-r--r--contrib/lisp/org-odt.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/lisp/org-odt.el b/contrib/lisp/org-odt.el
index 81abf5d..137a4d5 100644
--- a/contrib/lisp/org-odt.el
+++ b/contrib/lisp/org-odt.el
@@ -1825,7 +1825,8 @@ CATEGORY-HANDLE is used. See
(defun org-odt-fixup-label-references ()
(goto-char (point-min))
(while (re-search-forward
- "<text:sequence-ref text:ref-name=\"\\([^\"]+\\)\"/>" nil t)
+ "<text:sequence-ref text:ref-name=\"\\([^\"]+\\)\">[ \t\n]*</text:sequence-ref>"
+ nil t)
(let* ((label (match-string 1))
(label-def (assoc label org-odt-entity-labels-alist))
(rpl (and label-def
@@ -2278,8 +2279,9 @@ Do this when translation to MathML fails."
;; time we would have seen and collected all the label
;; definitions in `org-odt-entity-labels-alist'.
(org-odt-format-tags
- "<text:sequence-ref text:ref-name=\"%s\"/>" ""
- (org-add-props label '(org-protected t)))) t t)))))
+ '("<text:sequence-ref text:ref-name=\"%s\">" .
+ "</text:sequence-ref>")
+ "" (org-add-props label '(org-protected t)))) t t)))))
;; process latex fragments as part of
;; `org-export-preprocess-after-blockquote-hook'. Note that this hook