From 42124f9f023074d2726a83a28a0d7cd9a51e4596 Mon Sep 17 00:00:00 2001 From: Jorge Marques Date: Mon, 19 Aug 2024 12:53:11 +0200 Subject: [PATCH] Resolve git directive link with tree, bump version "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 --- adi_doctools/__init__.py | 2 +- adi_doctools/role/common.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/adi_doctools/__init__.py b/adi_doctools/__init__.py index f0faf3e..bbc475c 100644 --- a/adi_doctools/__init__.py +++ b/adi_doctools/__init__.py @@ -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__) diff --git a/adi_doctools/role/common.py b/adi_doctools/role/common.py index ffcc78a..a85576f 100644 --- a/adi_doctools/role/common.py +++ b/adi_doctools/role/common.py @@ -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)