| 1 | """ |
|---|
| 2 | Processor that calls the JavaScript Mimeview processor. |
|---|
| 3 | |
|---|
| 4 | Version: 0.1 (2007-01-22) |
|---|
| 5 | |
|---|
| 6 | Example: |
|---|
| 7 | {{{ |
|---|
| 8 | #!js |
|---|
| 9 | var func = function() { |
|---|
| 10 | this.obj = new Object(); |
|---|
| 11 | this.flag = true; |
|---|
| 12 | return 49; |
|---|
| 13 | } |
|---|
| 14 | }}} |
|---|
| 15 | |
|---|
| 16 | wadsworth(at)thefrontside(dot)net |
|---|
| 17 | |
|---|
| 18 | Blatantly copied and slightly altered from the pascal processor at: |
|---|
| 19 | http://trac.edgewall.org/attachment/wiki/ProcessorBazaar/pascal-0.0.1.py |
|---|
| 20 | """ |
|---|
| 21 | |
|---|
| 22 | from trac.mimeview import Mimeview |
|---|
| 23 | |
|---|
| 24 | def execute(hdf, text, env): |
|---|
| 25 | return Mimeview(env).render(None, 'text/x-javascript', text) |
|---|