Replace 'trim' with 'consumeSpace'