ollym / parrot

A lightning fast and lightweight templating engine for Node.js
38 stars 7 forks source link

Bugs with latest node (0.6.6) #5

Closed rickihastings closed 12 years ago

rickihastings commented 12 years ago
       .replace(new RegExp(':\\s*' + et, 'gm'), '{ %>')
       ^

SyntaxError: Invalid flags supplied to RegExp constructor 'g,m' at new RegExp (unknown source) at Object.render (/home/../node_modules/parrot/index.js:156:12)

Line 156 and the following 6 lines have been changed from ["g", "m"] to "gm", not sure why this has been changed in node but it now works.

    Script.runInNewContext(data, config.sandbox);
    ^

TypeError: Cannot call method 'runInNewContext' of undefined at Object.render (/home/../node_modules/parrot/index.js:165:9)

Script = process.binding('evals').Script has been changed to Script = require('vm') where 'runInNewContext' is now located.