Skip to content

Commit

Permalink
ob-js: Fix error when code block ends with a comment
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
Nicolas Goaziou committed Nov 21, 2016
1 parent 0bdf18b commit 0dd024a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lisp/ob-js.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0dd024a

Please sign in to comment.