mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-10-07 09:30:31 +00:00
Account for anchorlinks inside the same document
This commit is contained in:
parent
8064cddb1d
commit
3a1e3c7feb
1 changed files with 5 additions and 1 deletions
|
@ -93,4 +93,8 @@ def transform_github_links(app, doctree, fromdocname):
|
|||
docs_link = find_docs_link(abs_link)
|
||||
if docs_link is None:
|
||||
continue
|
||||
node['refuri'] = os.path.relpath(docs_link, os.path.dirname(fromdocname))
|
||||
# special handling for when we link inside the same document
|
||||
if docs_link.startswith('#'):
|
||||
node['refuri'] = docs_link
|
||||
else:
|
||||
node['refuri'] = os.path.relpath(docs_link, os.path.dirname(fromdocname))
|
||||
|
|
Loading…
Add table
Reference in a new issue