diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2013-06-21 13:40:33 -0600 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2013-06-21 13:40:38 -0600 |
commit | d34813c64a8805de25de669d3c1f6f1691e94be6 (patch) | |
tree | 644c7ca7573cf5cf2168876ef46eef825926cb0f | |
parent | 70b9b93feb795bb546c807d0d387f3debef24fb4 (diff) | |
download | org-mode-d34813c64a8805de25de669d3c1f6f1691e94be6.tar.gz |
more robust matching of examplized ranges
* lisp/ob-core.el (org-babel-read-result): More robust matching of
examplized ranges.
(org-babel-result-end): More robust matching of examplized ranges.
-rw-r--r-- | lisp/ob-core.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/ob-core.el b/lisp/ob-core.el index e2cb03b..9fddae3 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -1894,14 +1894,14 @@ following the source block." ((org-at-item-p) (org-babel-read-list)) ((looking-at org-bracket-link-regexp) (org-babel-read-link)) ((looking-at org-block-regexp) (org-babel-trim (match-string 4))) - ((looking-at "^[ \t]*: ") + ((or (looking-at "^[ \t]*: ") (looking-at "^[ \t]*:$")) (setq result-string (org-babel-trim (mapconcat (lambda (line) - (if (and (> (length line) 1) - (string-match "^[ \t]*: \\(.+\\)" line)) - (match-string 1 line) - line)) + (or (and (> (length line) 1) + (string-match "^[ \t]*: ?\\(.+\\)" line) + (match-string 1 line)) + "")) (split-string (buffer-substring (point) (org-babel-result-end)) "[\r\n]+") @@ -2165,7 +2165,7 @@ code ---- the results are extracted in the syntax of the source (progn (re-search-forward (concat "[ \t]*#\\+end_" (match-string 1)) nil t) (forward-char 1)) - (while (looking-at "[ \t]*\\(: \\|\\[\\[\\)") + (while (looking-at "[ \t]*\\(: \\|:$\\|\\[\\[\\)") (forward-line 1)))) (point))))) |