lib/glue/template.rb in glue-0.25.0 vs lib/glue/template.rb in glue-0.26.0

- old
+ new

@@ -57,17 +57,13 @@ end # xform render/inject instructions <render href="xxx" /> # must be transformed before the processinc instructions. - text.gsub!(/<inject href=["|'](.*?)["|'](.*)(.?)\/>/) do |match| - "<?r render '#$1' ?>" + text.gsub!(/<(render|inject) href=["|'](.*?)["|'](.*)(.?)\/>/) do |match| + "<?r render '#$2' ?>" end - - text.gsub!(/<render href=["|'](.*?)["|'](.*)(.?)\/>/) do |match| - "<?r render '#$1' ?>" - end # Remove <root> elements. typically removed by xslt but lets # play it safe. The <root> element is typically added to # template files to make them XHTML valid. @@ -152,9 +148,13 @@ setting :default, :default => 'index', :doc => 'The default template name' # The default template file extension. setting :extension, :default => 'xhtml', :doc => 'The default template file extension' + + # Strip xml comments from templates? + + setting :strip_xml_comments, :default => false, :doc => 'Strip xml comments from templates?' class << self include TemplateMixin alias_method :compile, :compile_template alias_method :transform, :compile_template