From 2f6543d2c418d4b489e92a7d3eabc3fa1cfd6adb Mon Sep 17 00:00:00 2001 From: Audun Ytterdal Date: Tue, 4 Jun 2024 04:38:25 +0200 Subject: [PATCH] Fix edit_uri starting with http when using ssh (#120) --- CHANGELOG.md | 7 +++++++ mkdocs_multirepo_plugin/structure.py | 3 +++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6d64a6..0b80314 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ +## 0.7.1 + +### Prs in Release + +- [Support edit_url starting with http](https://github.com/jdoiro3/mkdocs-multirepo-plugin/pull/120) + ## 0.7.0 ### Prs in Release + - [Fix section case](https://github.com/jdoiro3/mkdocs-multirepo-plugin/pull/124) - [Remove deprecation warning](https://github.com/jdoiro3/mkdocs-multirepo-plugin/pull/131) diff --git a/mkdocs_multirepo_plugin/structure.py b/mkdocs_multirepo_plugin/structure.py index 11dce15..e729a30 100644 --- a/mkdocs_multirepo_plugin/structure.py +++ b/mkdocs_multirepo_plugin/structure.py @@ -343,6 +343,9 @@ def get_edit_url( self.docs_dir.replace("/*", ""), src_path, ] + if self.edit_uri.startswith("http"): + # If edit_uri starts with http we will use this instead of repo url + url_parts.pop() return "/".join(part.strip("/") for part in url_parts) def set_edit_uri(self, edit_uri) -> None: