Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions sycl/doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# sys.path.insert(0, os.path.abspath('.'))

import datetime
from docutils import nodes

# -- Project information -----------------------------------------------------

Expand Down Expand Up @@ -51,11 +52,11 @@
suppress_warnings = [ 'misc.highlighting_failure' ]

def on_missing_reference(app, env, node, contnode):
if node['reftype'] == 'any':
contnode['refuri'] = "https://github.com/intel/llvm/tree/sycl/sycl/doc/" + node['reftarget']
return contnode
else:
return None
new_target = "https://github.com/intel/llvm/tree/sycl/sycl/doc/" + node['reftarget']

newnode = nodes.reference('', '', internal=False, refuri=new_target)
newnode.append(contnode)
return newnode

def setup(app):
app.connect('missing-reference', on_missing_reference)