From 3a6f5c98713804b85f4fcbbc739ec8dd504eab90 Mon Sep 17 00:00:00 2001 From: Michael Kessler Date: Sat, 9 Feb 2013 17:43:21 +0100 Subject: [PATCH] Explicit root constant lookup. (See #83) --- vendor/assets/javascripts/hamlcoffee.js.coffee.erb | 4 ++-- vendor/assets/javascripts/hamlcoffee_amd.js.coffee.erb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vendor/assets/javascripts/hamlcoffee.js.coffee.erb b/vendor/assets/javascripts/hamlcoffee.js.coffee.erb index b4b460b..9548511 100644 --- a/vendor/assets/javascripts/hamlcoffee.js.coffee.erb +++ b/vendor/assets/javascripts/hamlcoffee.js.coffee.erb @@ -74,9 +74,9 @@ class window.HAML # @return [String] the preserved text # @findAndPreserve: (text) -> - tags = '<%= HamlCoffeeAssets.config.preserveTags %>'.split(',').join('|') + tags = '<%= ::HamlCoffeeAssets.config.preserveTags %>'.split(',').join('|') text = text.replace ///<(#{ tags })>([^]*?)<\/\1>///g, (str, tag, content) -> - "<#{ tag }>#{ <%= HamlCoffeeAssets.config.customPreserve %>(content) }" + "<#{ tag }>#{ <%= ::HamlCoffeeAssets.config.customPreserve %>(content) }" # The surround helper surrounds the function output # with the start and end string without whitespace in between. diff --git a/vendor/assets/javascripts/hamlcoffee_amd.js.coffee.erb b/vendor/assets/javascripts/hamlcoffee_amd.js.coffee.erb index bf4060a..9b203a6 100644 --- a/vendor/assets/javascripts/hamlcoffee_amd.js.coffee.erb +++ b/vendor/assets/javascripts/hamlcoffee_amd.js.coffee.erb @@ -47,9 +47,9 @@ define -> # @return [String] the preserved text # findAndPreserve: (text) -> - tags = '<%= HamlCoffeeAssets.config.preserveTags %>'.split(',').join('|') + tags = '<%= ::HamlCoffeeAssets.config.preserveTags %>'.split(',').join('|') text = text.replace ///<(#{ tags })>([^]*?)<\/\1>/// g, (str, tag, content) -> - "<#{ tag }>#{ <%= HamlCoffeeAssets.config.customPreserve %>(content) }" + "<#{ tag }>#{ <%= ::HamlCoffeeAssets.config.customPreserve %>(content) }" # The surround helper surrounds the function output # with the start and end string without whitespace in between.