summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Davison <davison@stats.ox.ac.uk>2009-11-01 13:22:40 -0500
committerDan Davison <davison@stats.ox.ac.uk>2009-11-01 13:22:40 -0500
commit981c65b47d0a4f49219e1049b3158c06bcf4bada (patch)
tree5367132af913bba24097e52eaecccd014c81431a
parentfd54dd9c6620ec2308b07b625594e0f4ff081625 (diff)
downloadorg-mode-981c65b47d0a4f49219e1049b3158c06bcf4bada.tar.gz
Avoid empty strings when splitting header line in org-exp-blocks.
-rw-r--r--ChangeLog5
-rw-r--r--lisp/org-exp-blocks.el2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 77cca37..56a8be3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-01 Dan Davison <davison@stats.ox.ac.uk>
+
+ * org-exp-blocks.el: Modify split separator regexp to avoid empty
+ strings.
+
2009-10-21 James TD Smith <ahktenzero@mohorovi.cc>
* UTILITIES/x11idle.c: Add a small C program which outputs the X11
diff --git a/lisp/org-exp-blocks.el b/lisp/org-exp-blocks.el
index a78da00..258d863 100644
--- a/lisp/org-exp-blocks.el
+++ b/lisp/org-exp-blocks.el
@@ -176,7 +176,7 @@ specified in BLOCKS which default to the value of
"^\\([ \t]*\\)#\\+begin_\\(\\S-+\\)[ \t]*\\(.*\\)?[\r\n]\\([^\000]*?\\)[\r\n][ \t]*#\\+end_\\S-+.*" nil t)
(setq indentation (length (match-string 1)))
(setq type (intern (match-string 2)))
- (setq headers (save-match-data (split-string (match-string 3) "[ \t]")))
+ (setq headers (save-match-data (org-split-string (match-string 3) "[ \t]+")))
(setq body (match-string 4))
(setq preserve-indent (or org-src-preserve-indentation (member "-i" headers)))
(unless preserve-indent