ob-js: Fix error when code block ends with a comment

* lisp/ob-js.el (org-babel-js-function-wrapper): Isolate body within
  wrapper.

Reported-by: Compro Prasad <comproprasad@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110390>
This commit is contained in:
Nicolas Goaziou 2016-11-21 23:21:23 +01:00
parent 0bdf18befd
commit 0dd024aa92
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@
:type 'string)
(defvar org-babel-js-function-wrapper
"require('sys').print(require('sys').inspect(function(){%s}()));"
"require('sys').print(require('sys').inspect(function(){\n%s\n}()));"
"Javascript code to print value of body.")
(defun org-babel-execute:js (body params)