def format_tags(document, tags):
    """Obsidian style tags. Removes #-icon and adds a span tag."""
    for tag in tags:
        document = document.replace("#" + tag, "<span class=\"tag\">" + tag + "</span>")

    return document