AsciiDoc export: Group tags only if there are more than 20.
This commit is contained in:
parent
17b33eacbf
commit
8ff0d39927
|
@ -188,10 +188,12 @@ void Export::AsciiDoc::print_tags(const tagmap &tags) const
|
|||
}
|
||||
});
|
||||
|
||||
bool othertags = false;
|
||||
bool othertags = false; // Have we printed “Less used tags” already?
|
||||
for (const auto &tag : sortedtags)
|
||||
{
|
||||
if (tag.second.size() == 1)
|
||||
// If we have more than 20 tags, group all tags that occur only 1 time
|
||||
// under the section “Less used tags”.
|
||||
if (sortedtags.size() > 20 && tag.second.size() == 1)
|
||||
{
|
||||
if (!othertags)
|
||||
{
|
||||
|
|
|
@ -65,8 +65,7 @@ SCENARIO ("The AsciiDoc export works correctly")
|
|||
"Good description\\.\n");
|
||||
const regex re_tags
|
||||
("== Tags\n\n"
|
||||
"=== Less used tags\n\n"
|
||||
"==== \\[\\[t_tag1\\]\\]tag1\n\n"
|
||||
"=== \\[\\[t_tag1\\]\\]tag1\n\n"
|
||||
"\\* xref:dt_1970-01-01T\\d{2}:\\d{2}:\\d{2}"
|
||||
"\\[Nice title\\] _\\(1970-01-01\\)_\n\n");
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user