def cmd_to_markup(cmd):
    """Find the type a markup from the given command.

    The idea is that, since our testing directories are named after a format --
    'md', 'adoc', or 'rst', we can infer the type of markup by looking for
    those strings in the build command -- e.g.,

    `cd {dir} && gatsby build && cd ..

    where `{dir}` would one of 'md', 'adoc', or 'rst'.
    """
    if "md" in cmd:
        return "Markdown"
    elif "adoc" in cmd:
        return "AsciiDoc"
    return "reStructuredText"