Browse Source

Protect target-like text in verbatim snippets during ASCII export

Carsten Dominik 15 years ago
parent
commit
be8d644680
2 changed files with 5 additions and 1 deletions
  1. 3 0
      lisp/ChangeLog
  2. 2 1
      lisp/org-ascii.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2010-01-08  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-ascii.el (org-export-ascii-preprocess): Protect targets in
+	verbatim code for ASCII export.
+
 	* org.el (org-update-statistics-cookies): Also see checkboxes in
 	ordered lists.
 

+ 2 - 1
lisp/org-ascii.el

@@ -494,7 +494,8 @@ publishing directory."
   ;; Remove target markers
   (goto-char (point-min))
   (while (re-search-forward  "<<<?\\([^<>]*\\)>>>?\\([ \t]*\\)" nil t)
-    (replace-match "\\1\\2")))
+    (org-if-unprotected-at (match-beginning 1)
+      (replace-match "\\1\\2"))))
 
 (defun org-html-expand-for-ascii (line)
   "Handle quoted HTML for ASCII export."