Handle blank line case in line_shortening_rank()