Fix href in @linkplain links when not on the federated site
Bug: 18945445
Change-Id: I6c5ae6efc16f747470c4ab21076b030a32335f20
diff --git a/res/assets/templates/macros.cs b/res/assets/templates/macros.cs
index 81217db..0cfdb32 100644
--- a/res/assets/templates/macros.cs
+++ b/res/assets/templates/macros.cs
@@ -91,7 +91,10 @@
if:!tag.federatedSite ?><?cs
var:toroot ?><?cs
/if ?><?cs var:tag.href ?>"><?cs var:tag.label ?></a></code><?cs
- elif:tag.kind == "@linkplain" ?><a href="<?cs var:tag.href ?>"><?cs var:tag.label ?></a><?cs
+ elif:tag.kind == "@linkplain" ?><a href="<?cs
+ if:!tag.federatedSite ?><?cs
+ var:toroot ?><?cs
+ /if ?><?cs var:tag.href ?>"><?cs var:tag.label ?></a></a><?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