Skip to content

Commit 6b35090

Browse files
authored
Fix links to source examples in Airflow docs (apache#50082)
While apache#49978 added back source links and it nicely works for the providers, there was still a problem with links to sources in Airflow - they were prefixed with extra `src`. This PR fixes it.
1 parent 3594476 commit 6b35090

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

devel-common/src/sphinx_exts/exampleinclude.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ def create_node(env, relative_path, show_button):
195195
if relative_path.startswith("airflow-core/src/"):
196196
relative_path = relative_path.replace("airflow-core/src/", "", 1)
197197

198+
if relative_path.startswith("src/"):
199+
relative_path = relative_path.replace("src/", "", 1)
200+
198201
if relative_path.endswith(".py"):
199202
pagename = "_modules/" + relative_path[:-3]
200203
else:

0 commit comments

Comments
 (0)