Skip to content

Commit

Permalink
Fix edit_uri starting with http when using ssh (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
auduny authored Jun 4, 2024
1 parent 3ce1085 commit 2f6543d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
3 changes: 3 additions & 0 deletions mkdocs_multirepo_plugin/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2f6543d

Please sign in to comment.