瀏覽代碼

org-exp-blocks: cleanup trailing newline after block

* lisp/org-exp-blocks.el (org-export-blocks-preprocess):
  cleanup trailing newline after block
Eric Schulte 15 年之前
父節點
當前提交
f6e4790099
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lisp/org-exp-blocks.el

+ 1 - 1
lisp/org-exp-blocks.el

@@ -178,7 +178,7 @@ specified in BLOCKS which default to the value of
 	(goto-char (point-min))
 	(setq start (point))
 	(while (re-search-forward
-		"^\\([ \t]*\\)#\\+begin_\\(\\S-+\\)[ \t]*\\(.*\\)?[\r\n]\\([^\000]*?\\)[\r\n][ \t]*#\\+end_\\S-+.*" nil t)
+		"^\\([ \t]*\\)#\\+begin_\\(\\S-+\\)[ \t]*\\(.*\\)?[\r\n]\\([^\000]*?\\)[\r\n][ \t]*#\\+end_\\S-+.*[\r\n]?" nil t)
           (setq indentation (length (match-string 1)))
 	  (setq type (intern (downcase (match-string 2))))
 	  (setq headers (save-match-data (org-split-string (match-string 3) "[ \t]+")))