"""
Processor that calls the JavaScript Mimeview processor.

Version: 0.1 (2007-01-22)

Example:
{{{
#!js
var func = function() {
  this.obj = new Object();
  this.flag = true;
  return 49;
}
}}}

wadsworth(at)thefrontside(dot)net

Blatantly copied and slightly altered from the pascal processor at:
http://trac.edgewall.org/attachment/wiki/ProcessorBazaar/pascal-0.0.1.py
"""

from trac.mimeview import Mimeview

def execute(hdf, text, env):
        return Mimeview(env).render(None, 'text/x-javascript', text)
