|
@@ -1701,7 +1701,7 @@ from the buffer."
|
|
|
(ascii "ASCII" "BEGIN_ASCII" "END_ASCII")
|
|
|
(latex "LaTeX" "BEGIN_LaTeX" "END_LaTeX")))
|
|
|
(case-fold-search t)
|
|
|
- fmt)
|
|
|
+ fmt beg beg-content end end-content)
|
|
|
|
|
|
(while formatters
|
|
|
(setq fmt (pop formatters))
|
|
@@ -1715,16 +1715,17 @@ from the buffer."
|
|
|
(point-at-bol) (min (1+ (point-at-eol)) (point-max))
|
|
|
'(org-protected t))))
|
|
|
(goto-char (point-min))
|
|
|
- (while (re-search-forward
|
|
|
- (concat "^[ \t]*#\\+" (caddr fmt)
|
|
|
- "\\>.*\\(\\(\n.*\\)*?\n\\)[ \t]*#\\+" (cadddr fmt)
|
|
|
- "\\>.*\n?") nil t)
|
|
|
- (if (eq (car fmt) backend)
|
|
|
- ;; yes, keep this
|
|
|
- (add-text-properties (match-beginning 1) (1+ (match-end 1))
|
|
|
- '(org-protected t))
|
|
|
- ;; No, this is for a different backend, kill it
|
|
|
- (delete-region (match-beginning 0) (match-end 0)))))))
|
|
|
+ (while (re-search-forward (concat "^[ \t]*#\\+" (caddr fmt) "\\>.*\n?")
|
|
|
+ nil t)
|
|
|
+ (setq beg (match-beginning 0) beg-content (match-end 0))
|
|
|
+ (when (re-search-forward (concat "^[ \t]*#\\+" (cadddr fmt) "\\>.*\n?")
|
|
|
+ nil t)
|
|
|
+ (setq end (match-end 0) end-content (match-beginning 0))
|
|
|
+ (if (eq (car fmt) backend)
|
|
|
+ ;; yes, keep this
|
|
|
+ (add-text-properties beg-content end-content '(org-protected t))
|
|
|
+ ;; No, this is for a different backend, kill it
|
|
|
+ (delete-region beg end)))))))
|
|
|
|
|
|
(defun org-export-mark-blockquote-verse-center ()
|
|
|
"Mark block quote and verse environments with special cookies.
|