def combine_adjacent_lines(line_numbers):
        combine_template = "{0}-{1}"
        combined_list = []
        line_numbers.append(None)
        start = line_numbers[0]
        end = None
        for line_number in line_numbers[1:]:
            if (end if end else start) + 1 == line_number:
                end = line_number
            else:
                if end:
                    combined_list.append(combine_template.format(start, end))
                else:
                    combined_list.append(str(start))
                start = line_number
                end = None
        return combined_list