diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/docgen/RuleDocumentation.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/docgen/RuleDocumentation.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/docgen/RuleDocumentation.java b/src/main/java/com/google/devtools/build/docgen/RuleDocumentation.java index f173bdfaa1..6b9d5ae4a6 100644 --- a/src/main/java/com/google/devtools/build/docgen/RuleDocumentation.java +++ b/src/main/java/com/google/devtools/build/docgen/RuleDocumentation.java @@ -60,6 +60,11 @@ public class RuleDocumentation implements Comparable<RuleDocumentation> { private RuleLinkExpander linkExpander; /** + * Name of the page documenting common build rule terms and concepts. + */ + static final String COMMON_DEFINITIONS_PAGE = "common-definitions.html"; + + /** * Creates a RuleDocumentation from the rule's name, type, family and raw html documentation * (meaning without expanding the variables in the doc). */ @@ -250,7 +255,8 @@ public class RuleDocumentation implements Comparable<RuleDocumentation> { String attrName = attributeDoc.getAttributeName(); // Generate the link for the attribute documentation if (attributeDoc.isCommonType()) { - sb.append(String.format("<a href=\"common-definitions.html#%s.%s\">%s</a>", + sb.append(String.format("<a href=\"%s#%s.%s\">%s</a>", + COMMON_DEFINITIONS_PAGE, attributeDoc.getGeneratedInRule(ruleName).toLowerCase(), attrName, attrName)); |