From: Hank Lords Date: 2006-07-20T04:31:25+09:00 Subject: Re: Markaby/Xmlbuilder error - XmlMarkup cannot mix a text argument with a block I would have done like this: mab = Markaby::Builder.new mab.instance_eval template mab.to_s 2006/7/19, Farrel Lifson : > Hi folks, > > I'm not sure if I'm grokking how to use Markaby correctly. I'm trying > to render some external Markaby code as follows but get the > ArgumentError at the end: > >> require 'markaby' > => true > >> template =< html do > h1 "Header" do > p "Paragraph" > end > end > EOS > => "html do\n h1 \"Header\" do\n p \"Paragraph\"\n end\nend\n" > >> Markaby::Template.new(template).render > ArgumentError: /usr/lib/ruby/gems/1.8/gems/builder-2.0.0/lib/builder/xmlbase.rb:53:in > `method_missing': XmlMarkup cannot mix a text argument with a block > > What would be the correct way to render the given Markaby code > fragment? The error is bubbling up from XmlBuilder > > Farrel > >