From 4d4e1ed2a2006c21d2291ab22cb107658da94fd1 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 8 Jan 2010 09:41:16 +0100 Subject: [PATCH] Protect target-like text in verbatim snippets during ASCII export --- lisp/org-ascii.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lisp/org-ascii.el b/lisp/org-ascii.el index 18587250d..78a12d5d5 100644 --- a/lisp/org-ascii.el +++ b/lisp/org-ascii.el @@ -486,11 +486,12 @@ publishing directory." ;; Put quotes around verbatim text (goto-char (point-min)) (while (re-search-forward org-verbatim-re nil t) - (goto-char (match-end 2)) - (backward-delete-char 1) (insert "'") - (goto-char (match-beginning 2)) - (delete-char 1) (insert "`") - (goto-char (match-end 2))) + (org-if-unprotected-at (match-beginning 4) + (goto-char (match-end 2)) + (backward-delete-char 1) (insert "'") + (goto-char (match-beginning 2)) + (delete-char 1) (insert "`") + (goto-char (match-end 2)))) ;; Remove target markers (goto-char (point-min)) (while (re-search-forward "<<]*\\)>>>?\\([ \t]*\\)" nil t) -- 2.11.4.GIT