diff --git a/lisp/org-exp-blocks.el b/lisp/org-exp-blocks.el index 31fd32641..4c1a6b5cd 100644 --- a/lisp/org-exp-blocks.el +++ b/lisp/org-exp-blocks.el @@ -210,7 +210,11 @@ which defaults to the value of `org-export-blocks-witheld'." (delete-region match-start match-end) (goto-char match-start) (insert replacement) (unless preserve-indent - (indent-code-rigidly match-start (point) indentation)))))) + (indent-code-rigidly match-start (point) indentation))))) + ;; cleanup markers + (set-marker match-start nil) + (set-marker body-start nil) + (set-marker match-end nil)) (setq start (point)))) (interblock start (point-max)) (run-hooks 'org-export-blocks-postblock-hook)))))