Browse Source

Fix previous commit again

Now off.
Bastien Guerry 4 years ago
parent
commit
a3e8a1d604
1 changed files with 5 additions and 4 deletions
  1. 5 4
      lisp/ox-odt.el

+ 5 - 4
lisp/ox-odt.el

@@ -3093,9 +3093,10 @@ holding contextual information."
     (while (search-forward "<office:annotation>" nil t)
       (and (re-search-backward "</text:p>" nil t)
 	   (replace-match "" t t))
-      (and (search-forward "</office:annotation>" nil t)
-	   (re-search-forward "<text:p[^>]*>" nil t)
-	   (replace-match "" t t)))))
+      (search-forward "</office:annotation>" nil t)
+      (if (re-search-forward "<text:p[^>]*>" nil t)
+	  (replace-match "" t t)
+	(insert "\n</text:p>")))))
 
 
 ;;;; Src Block
@@ -4085,7 +4086,7 @@ contextual information."
 		       (with-current-buffer buf
 			 ;; Prettify output if needed.
 			 (if (equal (file-name-nondirectory (buffer-file-name buf))
-				      "content.xml")
+				    "content.xml")
 			     (org-odt--fix-annotations))
 			 (when org-odt-prettify-xml
 			   (indent-region (point-min) (point-max)))