Skip to content

Commit

Permalink
added json indents as arg
Browse files Browse the repository at this point in the history
  • Loading branch information
ThoSe1990 committed Nov 3, 2024
1 parent f9ed5ea commit bf2619d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/cucumber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ bool cwt_cucumber::print_help() const noexcept
}
return false;
}
bool cwt_cucumber::export_catalog() const noexcept
bool cwt_cucumber::export_catalog(
std::size_t json_indents /* = 2 */) const noexcept
{
if (get_options().catalog.readable_text)
{
Expand All @@ -90,7 +91,7 @@ bool cwt_cucumber::export_catalog() const noexcept
}
if (get_options().catalog.json)
{
catalog::print_json_to_sink();
catalog::print_json_to_sink(json_indents);
return true;
}
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/cucumber.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class cwt_cucumber

const options& get_options() const noexcept;
bool print_help() const noexcept;
bool export_catalog() const noexcept;
bool export_catalog(std::size_t json_indents = 2) const noexcept;
};

} // namespace cuke

0 comments on commit bf2619d

Please sign in to comment.