libsass icon indicating copy to clipboard operation
libsass copied to clipboard

selector-extend() and selector-replace() fail to parse valid inputs for $extendee

Open nex3 opened this issue 4 years ago • 2 comments

The function selector-extend("c.d", (c, ".d"), ".e") should return c.d, .e, but instead it throws Internal Error: Invalid UTF-8.

nex3 avatar Feb 26 '20 23:02 nex3

It looks like this is even broader than just failing to parse non-string inputs. It also fails to parse pseudo selectors with punctuation-y arguments. For example, selector-extend("a", ":b(^)", "c") also throws Internal Error: Invalid UTF-8.

nex3 avatar Feb 27 '20 01:02 nex3

In fact, it looks like punctuation in selector arguments causes Internal Error: Invalid UTF-8 in any argument:

  • selector-extend(":a(^)", "b", "c")
  • selector-extend("a", "b", ":c(^)")

nex3 avatar Feb 27 '20 01:02 nex3