lib/nanoc-conref-fs/datafiles.rb in nanoc-conref-fs-0.3.0 vs lib/nanoc-conref-fs/datafiles.rb in nanoc-conref-fs-0.3.1

- old
+ new

@@ -5,11 +5,10 @@ module Datafiles def self.apply_conditionals(config, path, content) data_vars = Conrefifier.file_variables(config[:data_variables], path) - data_vars = { :page => data_vars, :site => { :config => config } } - + data_vars = { 'page' => data_vars, 'site' => { 'config' => config } } content = content.gsub(/(\s*\{% (?:if|unless).+? %\}.*?\{% end(?:if|unless) %\})/m) do |match| # We must obfuscate Liquid variables while replacing conditionals match = match.gsub(/{{/, '~~#~~') match = Conrefifier.apply_liquid(match, data_vars) match.gsub('~~#~~', '{{')