Strip selectors before we start because otherwise leading spaces will cause selectors to match incorrectly.