瀏覽代碼

org-odt.el: Don't corrupt styles.xml while applying outline numbering

* contrib/lisp/org-odt.el
(org-odt-configure-outline-numbering): Tighten the regular
expression that matches "<text:outline-level-style ...>"
element.

Fixes bug reported here
http://lists.gnu.org/archive/html/emacs-orgmode/2011-10/msg00594.html
Jambunathan K 14 年之前
父節點
當前提交
9e90239a70
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      contrib/lisp/org-odt.el

+ 1 - 1
contrib/lisp/org-odt.el

@@ -2099,7 +2099,7 @@ visually."
 To disable outline numbering pass a LEVEL of 0."
   (goto-char (point-min))
   (let ((regex
-	 "<text:outline-level-style\\(.*\\)text:level=\"\\([^\"]*\\)\"\\(.*\\)>")
+	 "<text:outline-level-style\\([^>]*\\)text:level=\"\\([^\"]*\\)\"\\([^>]*\\)>")
 	(replacement
 	 "<text:outline-level-style\\1text:level=\"\\2\" style:num-format=\"\">"))
     (while (re-search-forward regex nil t)