Fixed formatting

This commit is contained in:
Bartek Kryza
2023-01-07 12:32:46 +01:00
parent f1f6051cf7
commit a1a9d4ae99
4 changed files with 6 additions and 5 deletions

View File

@@ -197,7 +197,8 @@ inja::json generator<C, D>::element_context(const E &e) const
if (file.is_absolute() && ctx.template contains("git")) if (file.is_absolute() && ctx.template contains("git"))
#endif #endif
relative_path = relative_path =
std::filesystem::relative(file, ctx["git"]["toplevel"]).string(); std::filesystem::relative(file, ctx["git"]["toplevel"])
.string();
ctx["element"]["source"]["path"] = relative_path; ctx["element"]["source"]["path"] = relative_path;
ctx["element"]["source"]["full_path"] = file.string(); ctx["element"]["source"]["full_path"] = file.string();

View File

@@ -599,7 +599,8 @@ template <> struct convert<sequence_diagram> {
// Ensure relative_to has a value // Ensure relative_to has a value
if (!rhs.relative_to.has_value) if (!rhs.relative_to.has_value)
rhs.relative_to.set(std::filesystem::current_path().lexically_normal()); rhs.relative_to.set(
std::filesystem::current_path().lexically_normal());
rhs.initialize_type_aliases(); rhs.initialize_type_aliases();

View File

@@ -101,8 +101,7 @@ bool is_git_repository()
return true; return true;
return contains( return contains(
trim(get_process_output("git rev-parse --git-dir")), trim(get_process_output("git rev-parse --git-dir")), ".git");
".git");
} }
std::string get_git_branch() std::string get_git_branch()

View File

@@ -1,8 +1,8 @@
#include <array> #include <array>
#include <map> #include <map>
#include <memory> #include <memory>
#include <vector>
#include <string> #include <string>
#include <vector>
namespace clanguml { namespace clanguml {
namespace t30002 { namespace t30002 {