Skip to content

Commit

Permalink
Fix broken help crosslinks for unit types with all-hidden variations
Browse files Browse the repository at this point in the history
Regression introduced in 6fe72e8.
Affected master only, because I missed two relevant lines when manually
forward-porting its 1.12 counterpart.
  • Loading branch information
irydacea committed Dec 23, 2014
1 parent b63e4e5 commit 92be8cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/help/help_topic_generators.cpp
Expand Up @@ -289,7 +289,7 @@ std::string unit_topic_generator::operator()() const {
std::string lang_unit = type->type_name();
std::string ref_id;
if (description_type(*type) == FULL_DESCRIPTION) {
const std::string section_prefix = type->variations().empty() ? "" : "..";
const std::string section_prefix = type->show_variations_in_help() ? ".." : "";
ref_id = section_prefix + unit_prefix + type->id();
} else {
ref_id = unknown_unit_topic;
Expand All @@ -315,7 +315,7 @@ std::string unit_topic_generator::operator()() const {
first = false;
}
const unit_type* base_type = unit_types.find(base_id, unit_type::HELP_INDEXED);
const std::string section_prefix = base_type->variations().empty() ? "" : "..";
const std::string section_prefix = base_type->show_variations_in_help() ? ".." : "";
ss << make_link(base_type->type_name(), section_prefix + unit_prefix + base_id) << "\n";
}
}
Expand Down

0 comments on commit 92be8cd

Please sign in to comment.