Handle whitespace before closing `>`

Fixes #267.