lib/express_templates/components/capabilities/parenting.rb in express_templates-0.3.0 vs lib/express_templates/components/capabilities/parenting.rb in express_templates-0.3.1
- old
+ new
@@ -52,10 +52,10 @@
def compile_children
compiled_children = nil
Indenter.for(:compile) do |indent, indent_with_newline|
compiled_children = children.map do |child|
indent_with_newline +
- (child.compile rescue %Q("#{child}")) # Bare strings may be children
+ (child.respond_to?(:compile) ? child.compile : child.inspect) # Bare strings may be children
end.join("+\n")
compiled_children.gsub!('"+"', '') # avoid unnecessary string concatenation
end
return compiled_children
end
\ No newline at end of file