Excellent and thanks for the feedback. I'm glad I was able to give something back to the community that has given me so much. I've also had issues with JavaScript source code blocks truncating the result when the value is a string with a comma. I'm still getting up to speed with Emacs-lisp but when I figure out how to fix the issue I will send the patch with proper comments. Thanks, Peter On Friday, November 21, 2014, Nicolas Goaziou wrote: > Hello, > > Peter Moresi > writes: > > > Sure, the patch is attached.​ > > Applied. Thank you. > > However I had to fill your commit message, which was incomplete. For > reference, here is what I used, from your initial report: > > --8<---------------cut here---------------start------------->8--- > ob-js: Fix passing multiline variables > > * lisp/ob-js.el (org-babel-js-var-to-js): Replace newline characters > with "\n" in strings. > > Let's say I have a multi-line string stored in an example block. > > I want to store my CSV in an example block. > > #+NAME: my-csv-data > #+BEGIN_EXAMPLE > ColA,ColB,ColC > 1,2,3 > 4,5,6 > #+END_EXAMPLE > > I have a JavaScript function that accepts a string named 'csv' and passing > in 'my-csv-data'. > > #+BEGIN_SRC js :var csv=my-csv-data :results output > console.log(csv); > #+END_SRC > > When I expand the source block I end up with: > > #+BEGIN_SRC js > var csv="ColA,ColB,ColC > 1,2,3 > 4,5,6"; > console.log(csv); > #+END_SRC > > This will not execute correctly because JavaScript does not support > newlines in strings. > > What I want instead is: > > #+BEGIN_SRC js > var csv="ColA,ColB,ColC\n 1,2,3\n 4,5,6"; > console.log(csv); > #+END_SRC > > TINYCHANGE > --8<---------------cut here---------------end--------------->8--- > > > Regards, > > -- > Nicolas Goaziou >