瀏覽代碼

Export: Allow center, quote, and verse markers to be indented

Carsten Dominik 16 年之前
父節點
當前提交
0b60bf8aac
共有 2 個文件被更改,包括 5 次插入3 次删除
  1. 2 0
      lisp/ChangeLog
  2. 3 3
      lisp/org-exp.el

+ 2 - 0
lisp/ChangeLog

@@ -7,6 +7,8 @@
 	(org-export-remove-indentation): New function.
 	(org-export-select-backend-specific-text): Allow backend-specific
 	code to be indented.
+	(org-export-mark-blockquote-verse-center): Allow markers to be
+	indented.
 
 	* org.el (org-fontify-meta-lines): New function.
 	(org-set-font-lock-defaults): Call the new fontification

+ 3 - 3
lisp/org-exp.el

@@ -1682,20 +1682,20 @@ from the buffer."
 These special cookies will later be interpreted by the backend."
   ;; Blockquotes
   (goto-char (point-min))
-  (while (re-search-forward "^#\\+\\(begin\\|end\\)_\\(block\\)?quote\\>.*"
+  (while (re-search-forward "^[ \t]*#\\+\\(begin\\|end\\)_\\(block\\)?quote\\>.*"
 			    nil t)
     (replace-match (if (equal (downcase (match-string 1)) "end")
 		       "ORG-BLOCKQUOTE-END" "ORG-BLOCKQUOTE-START")
 		   t t))
   ;; Verse
   (goto-char (point-min))
-  (while (re-search-forward "^#\\+\\(begin\\|end\\)_verse\\>.*" nil t)
+  (while (re-search-forward "^[ \t]*#\\+\\(begin\\|end\\)_verse\\>.*" nil t)
     (replace-match (if (equal (downcase (match-string 1)) "end")
 		       "ORG-VERSE-END" "ORG-VERSE-START")
 		   t t))
   ;; Center
   (goto-char (point-min))
-  (while (re-search-forward "^#\\+\\(begin\\|end\\)_center\\>.*" nil t)
+  (while (re-search-forward "^[ \t]*#\\+\\(begin\\|end\\)_center\\>.*" nil t)
     (replace-match (if (equal (downcase (match-string 1)) "end")
 		       "ORG-CENTER-END" "ORG-CENTER-START")
 		   t t)))