Browse Source

Export: Ignore radio matches in links

Carsten Dominik 15 years ago
parent
commit
741b523fa5
2 changed files with 7 additions and 2 deletions
  1. 1 0
      lisp/ChangeLog
  2. 6 2
      lisp/org-exp.el

+ 1 - 0
lisp/ChangeLog

@@ -2,6 +2,7 @@
 
 	* org-exp.el (org-export-format-source-code-or-example): Fix bug
 	that did not enumerate first line.
+	(org-export-mark-radio-links): Skip matches in links.
 
 2009-07-18  Carsten Dominik  <carsten.dominik@gmail.com>
 

+ 6 - 2
lisp/org-exp.el

@@ -1792,8 +1792,12 @@ When it is nil, all comments will be removed."
     (goto-char (point-min))
     (when re-radio
       (while (re-search-forward re-radio nil t)
-	(org-if-unprotected
-	 (replace-match "\\1[[\\2]]"))))))
+	(unless
+	    (save-match-data
+	      (or (org-in-regexp org-bracket-link-regexp)
+		  (org-in-regexp org-plain-link-re)))
+	  (org-if-unprotected
+	   (replace-match "\\1[[\\2]]")))))))
 
 (defun org-export-remove-special-table-lines ()
   "Remove tables lines that are used for internal purposes."