how about...
bits = Array.new if ... bits << span("text", :stroke=>blue) else span("other", :stroke => red) endpara *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?
