Skip to content

Commit

Permalink
Use posix paths to generate links
Browse files Browse the repository at this point in the history
Resolves #14.
GooRoo committed Jul 21, 2024
1 parent 648312d commit 61e2461
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mkdocs_obsidian_bridge/plugin.py
Original file line number Diff line number Diff line change
@@ -209,7 +209,7 @@ def replace_markdown_link(self, page_path: Path, match: re.Match) -> str:
new_link = f'''[{
match['label']
}]({
urllib.parse.quote(str(new_path))
urllib.parse.quote(new_path.as_posix())
}{
self.slugify(match['fragment'])
}{
@@ -296,7 +296,7 @@ def replace_obsidian_link(self, page_path: Path, match: re.Match) -> str:
new_link = f'''[{
match['label'] or alternative_label
}]({
urllib.parse.quote(str(new_path or link_filepath))
urllib.parse.quote((new_path or link_filepath).as_posix())
}{
self.slugify(match['fragment'])
})'''
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "mkdocs-obsidian-bridge"
version = "1.0.3"
version = "1.0.4"
description = "An MkDocs plugin that helps exporting your Obsidian vault as an MkDocs site."
authors = ["GooRoo <sergey.olendarenko@gmail.com>"]
license = "BSD-3-Clause"

0 comments on commit 61e2461

Please sign in to comment.