

def bokeh_tree(name, rawtext, text, lineno, inliner, options=None, content=None):
    ' Link to a URL in the Bokeh GitHub tree, pointing to appropriate tags\n    for releases, or to master otherwise.\n\n    The link text is simply the URL path supplied, so typical usage might\n    look like:\n\n    .. code-block:: none\n\n        All of the examples are located in the :bokeh-tree:`examples`\n        subdirectory of your Bokeh checkout.\n\n\n    Returns 2 part tuple containing list of nodes to insert into the\n    document and a list of system messages.  Both are allowed to be\n    empty.\n\n    '
    app = inliner.document.settings.env.app
    tag = app.env.config['version']
    if ('-' in tag):
        tag = 'master'
    url = ('%s/tree/%s/%s' % (BOKEH_GH, tag, text))
    _try_url(app, url, 'tree')
    options = (options or {
        
    })
    set_classes(options)
    node = nodes.reference(rawtext, text, refuri=url, **options)
    return ([node], [])

dataset/ETHPy150Open bokeh/bokeh/bokeh/sphinxext/bokeh_github.py bokeh_tree/original