summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2010-07-25 12:32:48 -0600
committerEric Schulte <schulte.eric@gmail.com>2010-07-25 12:32:48 -0600
commitbb8086ffbb600ab9ae4607b79961cd625d807f6b (patch)
tree0dc4acf74bed36413b91a6d73526cc9b1f36dc1a
parent6b5cf346aea7bff80f67c91354524390ac167327 (diff)
downloadorg-mode-bb8086ffbb600ab9ae4607b79961cd625d807f6b.tar.gz
ob-C: more generous regular expression for matching main call
* lisp/ob-C.el (org-babel-C-ensure-main-wrap): more generous regular expression for matching main function
-rw-r--r--lisp/ob-C.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/ob-C.el b/lisp/ob-C.el
index e595ac6..24f5a51 100644
--- a/lisp/ob-C.el
+++ b/lisp/ob-C.el
@@ -151,7 +151,7 @@ it's header arguments."
(defun org-babel-C-ensure-main-wrap (body)
"Wrap body in a \"main\" function call if none exists."
- (if (string-match "^[ \t]*[intvod]+[ \t]*main[ \t]*(.*)" body)
+ (if (string-match "^[ \t]*[intvod]+[ \t\n\r]*main[ \t]*(.*)" body)
body
(format "int main() {\n%s\n}\n" body)))