Rewrite spaces to ampersands in ts-queries.