From: ahoward Date: 2003-05-31T00:32:06+09:00 Subject: Re: amrita parsing On Fri, 30 May 2003, Andrew wrote: > I've run into a problem with amrita not liking spaces in directory names. > > This > > gets translated into > > > but this > > is fine. > > Any reason why this would happen? this looks like a bug to me: eg/ruby > irb -r amrita/template irb(main):001:0> Amrita::TemplateText.new('').expand STDOUT, {:link => Amrita::a(:href => 'a space'){'a space'}} a space=> # that can't be right. i thought it would have given a space=> # or something > I'm using amrita 1.0.2, ruby 1.6.8 and strscan 0.6.7 in windows 2000. > > Another problem I've encountered is that I was getting an error about > embedding a

in a
. My code looked like this... >
>

stuff

>
> > It accepted this though... >
>

stuff >

hmm. works for me - same ruby, same strscan, gsub /windows/, 'linux': ~ > irb -r amrita/template irb(main):001:0> include Amrita; TemplateText.new('

p

').expand STDOUT, {:a=>42}
42
=> # irb(main):002:0> include Amrita; TemplateText.new('
').expand STDOUT, {:a=>42}
42
=> # btw. all the text in the div tag gets *replaced* by the model data though, so why have anything nested there at all?? > My ruby code for both issues mentioned in this post use the following ruby > code... > tmpl = TemplateFile.new("main_template.html") > data = { > .. > } > tmpl.prettyprint = true > tmpl.expand(STDOUT, data) > > Note: I've used .. for brevity. send (or post) me the exact script and i'll try it on my system(s). -a -- ==================================== | Ara Howard | NOAA Forecast Systems Laboratory | Information and Technology Services | Data Systems Group | R/FST 325 Broadway | Boulder, CO 80305-3328 | Email: ara.t.howard@fsl.noaa.gov | Phone: 303-497-7238 | Fax: 303-497-7259 | ~ > ruby -e 'p % ^) .intern' ====================================