import re


def strip_markdown_directives(line):
    """strips markdown directives from a line"""
    line = line.strip()
    if line.startswith("<") and line.endswith(">"):
        # Let's assume it's inline HTML and skip it
        return ""

    # Remove URLs (assume remote starts with http and local ends with html)
    line = re.sub(r'\[(.+?)]\(http[^\)]+\)', r'\1', line)
    line = re.sub(r'\[(.+?)]\(.+?html\)', r'\1', line)
    line = re.sub(r'<http:.+?>', r'', line)
    return line