Trim trailing whitespace in lens.js