Exemple #1
0
 def do_glob_math(self, cont):
     """Performs #{}-interpolation.  The result is always treated as a fixed
     syntactic unit and will not be re-evaluated.
     """
     # TODO that's a lie!  this should be in the parser for most cases.
     cont = str(cont)
     if '#{' not in cont:
         return cont
     cont = _expr_glob_re.sub(self._pound_substitute, cont)
     return cont
Exemple #2
0
 def do_glob_math(self, cont):
     """Performs #{}-interpolation.  The result is always treated as a fixed
     syntactic unit and will not be re-evaluated.
     """
     # TODO that's a lie!  this should be in the parser for most cases.
     cont = str(cont)
     if '#{' not in cont:
         return cont
     cont = _expr_glob_re.sub(self._pound_substitute, cont)
     return cont
Exemple #3
0
 def do_glob_math(self, cont):
     """Performs #{}-interpolation.  The result is always treated as a fixed
     syntactic unit and will not be re-evaluated.
     """
     # TODO this should really accept and/or parse an *expression* and
     # return a type  :|
     cont = str(cont)
     if "#{" not in cont:
         return cont
     cont = _expr_glob_re.sub(self._calculate_expr, cont)
     return cont
Exemple #4
0
 def do_glob_math(self, cont):
     """Performs #{}-interpolation.  The result is always treated as a fixed
     syntactic unit and will not be re-evaluated.
     """
     # TODO this should really accept and/or parse an *expression* and
     # return a type  :|
     cont = str(cont)
     if '#{' not in cont:
         return cont
     cont = _expr_glob_re.sub(self._calculate_expr, cont)
     return cont
Exemple #5
0
 def do_glob_math(self, cont):
     """Performs #{}-interpolation.  The result is always treated as a fixed
     syntactic unit and will not be re-evaluated.
     """
     # TODO that's a lie!  this should be in the parser for most cases.
     if not isinstance(cont, six.string_types):
         warn(FutureWarning(
             "do_glob_math was passed a non-string {0!r} "
             "-- this will no longer be supported in pyScss 2.0"
             .format(cont)
         ))
         cont = six.text_type(cont)
     if '#{' not in cont:
         return cont
     cont = _expr_glob_re.sub(self._pound_substitute, cont)
     return cont
Exemple #6
0
 def do_glob_math(self, cont):
     """Performs #{}-interpolation.  The result is always treated as a fixed
     syntactic unit and will not be re-evaluated.
     """
     # TODO that's a lie!  this should be in the parser for most cases.
     if not isinstance(cont, six.string_types):
         warn(
             FutureWarning(
                 "do_glob_math was passed a non-string {0!r} "
                 "-- this will no longer be supported in pyScss 2.0".format(
                     cont)))
         cont = six.text_type(cont)
     if '#{' not in cont:
         return cont
     cont = _expr_glob_re.sub(self._pound_substitute, cont)
     return cont