You could just use `content.trim()` here.