org-exp: check for protection before removing comments
* lisp/org-exp.el (org-export-handle-comments): check for protection before removing comments
This commit is contained in:
parent
ee629299c0
commit
0e636dc2ed
|
@ -1644,14 +1644,17 @@ When it is nil, all comments will be removed."
|
|||
(while (or (looking-at re)
|
||||
(re-search-forward re nil t))
|
||||
(setq pos (match-beginning 0))
|
||||
(if (and commentsp
|
||||
(not (equal (char-before (match-end 1)) ?+)))
|
||||
(progn (add-text-properties
|
||||
(match-beginning 0) (match-end 0) '(org-protected t))
|
||||
(replace-match (format commentsp (match-string 2)) t t))
|
||||
(goto-char (1+ pos))
|
||||
(replace-match "")
|
||||
(goto-char (max (point-min) (1- pos)))))))
|
||||
(if (get-text-property (point) 'org-protected)
|
||||
(goto-char (1+ pos))
|
||||
(if (and commentsp
|
||||
(not (equal (char-before (match-end 1)) ?+)))
|
||||
(progn (add-text-properties
|
||||
(match-beginning 0) (match-end 0) '(org-protected t))
|
||||
(replace-match (format commentsp (match-string 2)) t t))
|
||||
(goto-char (1+ pos))
|
||||
(replace-match "")
|
||||
(goto-char (max (point-min) (1- pos))))))))
|
||||
|
||||
|
||||
(defun org-export-mark-radio-links ()
|
||||
"Find all matches for radio targets and turn them into internal links."
|
||||
|
|
Loading…
Reference in New Issue