def dont_linkify_urls(attrs, new=False):
    """Prevent file extensions to convert to links.

    This is a callback function used by bleach.linkify().
    Prevent strings ending with substrings in `file_exts` to be
    converted to links unless it starts with http or https.
    """
    file_exts = ('.py', '.md', '.sh')
    txt = attrs['_text']
    if txt.startswith(('http://', 'https://')):
        return attrs
    if txt.endswith(file_exts):
        return None
    return attrs