Fixed path separators in diagram link URL's in Windows

This commit is contained in:
Bartek Kryza
2023-01-11 00:29:43 +01:00
parent c7d201eef9
commit 3fbf3da27f
4 changed files with 51 additions and 1 deletions

View File

@@ -200,7 +200,7 @@ inja::json generator<C, D>::element_context(const E &e) const
std::filesystem::relative(file, ctx["git"]["toplevel"])
.string();
ctx["element"]["source"]["path"] = relative_path;
ctx["element"]["source"]["path"] = util::path_to_url(relative_path);
ctx["element"]["source"]["full_path"] = file.string();
ctx["element"]["source"]["name"] = file.filename().string();
ctx["element"]["source"]["line"] = e.line();