From f9ad788fb2e7743efc0631573212aa04d4375ab8 Mon Sep 17 00:00:00 2001 From: Wu Zhenyu Date: Sat, 2 Sep 2023 22:30:50 +0800 Subject: [PATCH] :sparkles: Support globstar --- src/sphinxcontrib/requirements_txt/directive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sphinxcontrib/requirements_txt/directive.py b/src/sphinxcontrib/requirements_txt/directive.py index 0db7d25..02caf3e 100644 --- a/src/sphinxcontrib/requirements_txt/directive.py +++ b/src/sphinxcontrib/requirements_txt/directive.py @@ -88,7 +88,7 @@ def run(self) -> list[Node]: file = os.path.join(os.path.dirname(path), content) fmt = self.options.get("title", self.config["requirements_title"]) new_contents = [] - for filename in glob(file): + for filename in glob(file, recursive=True): title = os.path.basename(filename).split(os.path.extsep)[0] if fmt.find("{title}") >= 0: title = fmt.format(title=title)