lib/nanoc-conref-fs/datafiles.rb in nanoc-conref-fs-0.4.2 vs lib/nanoc-conref-fs/datafiles.rb in nanoc-conref-fs-0.4.3

- old
+ new

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