I'm trying to get CoffeeKup to work with Mozilla's Rhino engine. Not much luck so far. I'm trying this simple template:
templates ?= {}
templates.first = ->
doctype 5
html ->
head ->
title "#{@title}"
body ->
h1 "#{@hello}"
Which I compile and then try to render using
CoffeeKup.render(templates.first, {title: 'Say Hello', hello: 'Hello World!'});
But it fails with this:
org.mozilla.javascript.EcmaError: SyntaxError: invalid return (CoffeeKup#304(Function)#230)
In the Javascript version of coffeekup.coffee, line 304 is this one:
return new Function('data', code);
And code is attached, line 230 (last line) is this:
).call(data);return __ck.buffer.join('');
Does anything look out of the ordinary or is this perhaps a Rhino bug?