Whoopse, I forgot the bits << before the span in the else block. Oh well!

On 24/06/2008, at 8:39 AM, Bluebie, Jenna wrote:

how about...

bits = Array.new
if ...
        bits << span("text", :stroke=>blue)
else
        span("other", :stroke => red)
end

para *bits


On 24/06/2008, at 8:12 AM, jonty wrote:

I am trying to parse text and then reassemble it for display conditional on the content of the text and set formatting accordingly.

But I am getting stuck on how to do this in shoes

para doesn't accept a block more's the pity

(say -  para do
if ... span("text", :stroke=>blue)
else span ("other" ;stroke=>red)
end
end)

Anyone help?


Reply via email to