import pathlib


def md_files(file_list):
    """Get list of markdown files from the repository file list"""
    md_files = []
    while file_list:
        git_file = file_list.pop()
        if pathlib.Path(git_file.name).suffix == ".md":
            md_files.append(git_file)
    return md_files