class Sass::Tree::Node
def interpolate(text, environment)
-
(String)
- The interpolated text
Parameters:
-
environment
(Sass::Environment
) -- The lexical environment containing -
text
(String
) -- The text to interpolate
def interpolate(text, environment) res = '' rest = Haml::Shared.handle_interpolation text do |scan| escapes = scan[2].size res << scan.matched[0...-2 - escapes] if escapes % 2 == 1 res << "\\" * (escapes - 1) << '#{' else res << "\\" * [0, escapes - 1].max res << Script::Parser.new(scan, line, scan.pos - scan.matched_size, filename). parse_interpolated.perform(environment).to_s end end res + rest end