lib/renderers/comment.rb in garterbelt-0.0.7 vs lib/renderers/comment.rb in garterbelt-0.0.8
- old
+ new
@@ -2,11 +2,15 @@
class Comment < Text
def initialize(opts)
super
end
+ def template
+ view.render_style == :text ? "" : "#{indent}<!-- #{content} -->#{line_end}"
+ end
+
def render
raise_with_block_content
- output << "#{indent}<!-- #{content} -->\n"
+ output << template
end
end
end
\ No newline at end of file