Skip to content

Commit 43a6d92

Browse files
committed
Fixed issue with OS-specific paths in tags plugin
1 parent fd60d5b commit 43a6d92

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/plugins/tags/plugin.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,15 @@ def __render_tag_links(self, tag, pages):
107107
content = [f"## <span class=\"md-tag\">{tag}</span>", ""]
108108
for page in pages:
109109
url = utils.get_relative_url(
110-
page.file.src_path,
111-
self.tags_file.src_path
110+
page.file.src_path.replace(os.path.sep, "/"),
111+
self.tags_file.src_path.replace(os.path.sep, "/")
112112
)
113113

114114
# Ensure forward slashes, as we have to use the path of the source
115115
# file which contains the operating system's path separator.
116116
content.append("- [{}]({})".format(
117117
page.meta.get("title", page.title),
118-
url.replace(os.path.sep, "/")
118+
url
119119
))
120120

121121
# Return rendered tag links

0 commit comments

Comments
 (0)