diff options
-rw-r--r-- | scss/types.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scss/types.py b/scss/types.py index cb0d90f..d38cc10 100644 --- a/scss/types.py +++ b/scss/types.py @@ -745,7 +745,11 @@ class String(Value): if not other.is_unitless: raise TypeError("Can only multiply strings by unitless numbers") - return String(self.value * other.value, quotes=self.quotes) + n = other.value + if n != int(n): + raise ValueError("Can only multiply strings by integers") + + return String(self.value * int(other.value), quotes=self.quotes) def render(self, compress=False): return self.__str__() |