On Thu, Jul 20, 2006 at 04:24:07AM +0900, Farrel Lifson wrote: > >>template =<<EOS > 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 The error is in the template. h1 "Header" do; ... end That's invalid. Try: html do h1 "Header" p "Paragraph" end Or, if the paragraph does really belong in the header: html do h1 { "Header" + p("Paragraph") } end The last one requires Markaby 0.4.65 or greater[1]. May good fortune swirl around in your Thermos forevermore. _why [1] gem install markaby --source code.whytheluckystiff.net