"],
[:multi,
[:static, "\n "],
[:multi,
[:static, "text"],
[:multi,
[:code, "_temple_html_pretty2 = (code).to_s"],
[:code, 'if _temple_html_pretty1 !~ _temple_html_pretty2; _temple_html_pretty2.gsub!("\n", "\n "); end'],
[:dynamic, "_temple_html_pretty2"]]],
[:static, "
"]],
[:static, "\n"]]]
end
it 'should not indent preformatted tags' do
@html.call([:html, :tag, 'pre', [:multi],
[:html, :tag, 'p', [:multi], [:static, 'text']]
]).should.equal [:multi,
[:code, "_temple_html_pretty1 = /"],
[:multi,
[:static, ""],
[:static, "text"],
[:static, "
"]],
[:static, ""]]]
end
end