lib/renderers/text.rb in garterbelt-0.1.0 vs lib/renderers/text.rb in garterbelt-0.1.1

- old
+ new

@@ -1,13 +1,12 @@ module Garterbelt class Text < Renderer - attr_accessor :content, :escape + attr_accessor :content def initialize(opts) super self.content = opts[:content] || '' - self.escape = view._escape end def raise_with_block_content raise ArgumentError, "#{self.class} does not take block content" if self.content.is_a?(Proc) end @@ -27,9 +26,13 @@ end str else content end + end + + def line_end + style == :compact ? '' : super end def template "#{escaped_content}#{line_end}" end