Rename prefix to metadata in print_matches().
This commit is contained in:
parent
03138c1dbf
commit
fe23fcf04b
|
@ -54,23 +54,23 @@ void print_matches(const std::vector<search::match> &matches,
|
|||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> prefix;
|
||||
std::vector<std::string> metadata;
|
||||
if (!opts.no_fn_epub)
|
||||
{
|
||||
prefix.emplace_back(match.filepath);
|
||||
metadata.emplace_back(match.filepath);
|
||||
}
|
||||
if (!match.headline.empty())
|
||||
{
|
||||
prefix.emplace_back(match.headline);
|
||||
metadata.emplace_back(match.headline);
|
||||
}
|
||||
if (!match.page.empty())
|
||||
{
|
||||
prefix.emplace_back("page " + match.page);
|
||||
metadata.emplace_back("page " + match.page);
|
||||
}
|
||||
for (const auto &part : prefix)
|
||||
for (const auto &part : metadata)
|
||||
{
|
||||
cout << part;
|
||||
if (part != *(prefix.rbegin()))
|
||||
if (part != *(metadata.rbegin()))
|
||||
{
|
||||
cout << ", ";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user