Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Explicit root constant lookup. (See #83)

  • Loading branch information...
commit 3a6f5c98713804b85f4fcbbc739ec8dd504eab90 1 parent 7c6d256
@netzpirat authored
View
4 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 }>"
+ "<#{ tag }>#{ <%= ::HamlCoffeeAssets.config.customPreserve %>(content) }</#{ tag }>"
# The surround helper surrounds the function output
# with the start and end string without whitespace in between.
View
4 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 }>"
+ "<#{ tag }>#{ <%= ::HamlCoffeeAssets.config.customPreserve %>(content) }</#{ tag }>"
# The surround helper surrounds the function output
# with the start and end string without whitespace in between.

0 comments on commit 3a6f5c9

Please sign in to comment.
Something went wrong with that request. Please try again.