import re


def parse_include(raw_lines):
    """Parse the heading of the raw_lines and return a list of filepaths to be included.

    :param iterable raw_lines: Mariofile raw_lines.
    :rtype: (list, iterable)
    """
    filepaths = []
    current_line = 0
    # workaround for files with only includes and without newline at the end of the file.
    raw_lines += '\n'
    for current_line, raw_line in enumerate(raw_lines):
        line = raw_line.partition('#')[0].rstrip()
        include_match = re.match(r'^include\s+(.*)\s*$', line)
        if not line.strip():
            continue
        elif include_match:
            filepaths.append(include_match.group(1))
        else:
            break
    return filepaths, current_line