fix error in doclava that was causing 'toroot' variable
to show up at the beginning of federated URLs
bug: 13512870
Change-Id: I2486dd2248bd8a2d9931d77af9be860e99968234
diff --git a/res/assets/templates/macros.cs b/res/assets/templates/macros.cs
index 867abcd..678710a 100644
--- a/res/assets/templates/macros.cs
+++ b/res/assets/templates/macros.cs
@@ -70,10 +70,16 @@
each:tag = tags ?><?cs
if:tag.name == "Text" ?><?cs var:tag.text?><?cs
elif:tag.kind == "@more" ?><p><?cs
- elif:tag.kind == "@see" ?><code><a href="<?cs var:toroot ?><?cs var:tag.href ?>"><?cs var:tag.label ?></a></code><?cs
+ elif:tag.kind == "@see" ?><code><a href="<?cs
+ if:!tag.federatedSite ?><?cs
+ var:toroot ?><?cs
+ /if ?><?cs var:tag.href ?>"><?cs var:tag.label ?></a></code><?cs
elif:tag.kind == "@seeHref" ?><a href="<?cs var:tag.href ?>"><?cs var:tag.label ?></a><?cs
elif:tag.kind == "@seeJustLabel" ?><?cs var:tag.label ?><?cs
- elif:tag.kind == "@value" ?><code><a href="<?cs var:toroot ?><?cs var:tag.href ?>"><?cs var:tag.text ?></a></code><?cs
+ elif:tag.kind == "@value" ?><code><a href="<?cs
+ if:!tag.federatedSite ?><?cs
+ var:toroot ?><?cs
+ /if ?><?cs var:tag.href ?>"><?cs var:tag.text ?></a></code><?cs
elif:tag.kind == "@code" ?><code><?cs var:tag.text ?></code><?cs
elif:tag.kind == "@samplecode" ?><pre><?cs var:tag.text ?></pre><?cs
elif:tag.name == "@sample" ?><pre><?cs var:tag.text ?></pre><?cs
diff --git a/src/com/google/doclava/SeeTagInfo.java b/src/com/google/doclava/SeeTagInfo.java
index 312e603..34e6aed 100644
--- a/src/com/google/doclava/SeeTagInfo.java
+++ b/src/com/google/doclava/SeeTagInfo.java
@@ -54,6 +54,7 @@
data.setValue(base + ".label", linkRef.label);
if (linkRef.href != null) {
data.setValue(base + ".href", linkRef.href);
+ data.setValue(base + ".federatedSite", linkRef.federatedSite);
}
if (ClearPage.toroot != null) {