[Nitro] Template compilation bug

George Moschovitis george.moschovitis at gmail.com
Thu Nov 17 02:58:33 EST 2005


Hmm thanks for the bug report, will have a look at it. But as always a
patch is really prefered :)

regards,
George.


On 11/17/05, James Britt <james_b at neurogami.com> wrote:
> Apologies f this was already reported, but it's the first I've seen it
> (I'm using Nitro 0.24 with Ruby 1.8.2 on Windows)
>
> I was trying to create a simple Web page that took the contents of a
> text field and coped it over to a div as the user typed.
>
> But I kept getting JavaScript errors.
>
> My template has a javascript section with this code:
>
>
>   function process( text ) {
>     return( text.replace( /\n/, "\n\r" ) );
>   }
>
> What ends up in the browser, though, is this:
>
> function process( text ) {
>        return( text.replace( /
> /, "
>
> " ) );
>
>       }
>
> It seems that my newline and carriage-return text is being interpreted
> literally  by Nitro, instead of being passed though as-is.
>
> I can work around this by sticking the script in an external file, but
> that should be required.
>
>
> Thanks,
>
>
> James
>
> --
>
> http://www.ruby-doc.org       - Ruby Help & Documentation
> http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted
> http://www.rubystuff.com      - The Ruby Store for Ruby Stuff
> http://www.jamesbritt.com     - Playing with Better Toys
> http://www.30secondrule.com   - Building Better Tools
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>


--
http://www.gmosx.com
http://www.navel.gr
http://www.nitrohq.com




More information about the Nitro-general mailing list