Improved whitespace consideration in injector