Skip to content

Commit

Permalink
Resolve git directive link with tree, bump version
Browse files Browse the repository at this point in the history
"blob" path does not work for compound branch names at the root path,
e.g.
blob/staging/feature/
so use tree and have GitHub redirecting to "blob" when it's a file.

Signed-off-by: Jorge Marques <[email protected]>
  • Loading branch information
gastmaier committed Aug 19, 2024
1 parent c6a1f67 commit 42124f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion adi_doctools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .role import setup as role_setup
from .lut import get_lut

__version__ = "0.3.36"
__version__ = "0.3.37"

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion adi_doctools/role/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def role(name, rawtext, text, lineno, inliner, options={}, content=[]):
path = ''
if text is None:
text = path
url = url + '/blob/' + branch + '/' + path
url = url + '/tree/' + branch + '/' + path
node = nodes.reference(rawtext, text, refuri=url,
classes=['icon', 'git'], **options)
add_link(inliner, lineno, url)
Expand Down

0 comments on commit 42124f9

Please sign in to comment.