aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/docgen/RuleDocumentation.java
diff options
context:
space:
mode:
authorGravatar gregce <gregce@google.com>2017-04-04 22:30:25 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2017-04-05 15:19:54 +0200
commit27a91eb6a9dfd2db9cffad894833d92c8cb42c9b (patch)
treecc5b07f9342dc7aabc1e1f8e836adb98c8b0b10c /src/main/java/com/google/devtools/build/docgen/RuleDocumentation.java
parente11775c2394fc48ac7fe5b632b47ae952dd552b4 (diff)
Hyperlink "nonconfigurable"-tagged attributes to Bazel's
configurable attributes documentation. PiperOrigin-RevId: 152188409
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.java8
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));