You should trim `line` only once.