summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Main <smain@google.com>2018-05-01 12:20:49 -0700
committerScott Main <smain@google.com>2018-05-02 18:21:25 +0000
commit85499da13c38512f16bf30f0279a3e247cdc8354 (patch)
tree7bdc91332e3fcb9144ee00ddcb498f7333103cdf
parent55c48ce3f2ac765949265b7c1ab8cf968b0495f0 (diff)
downloaddoclava-85499da13c38512f16bf30f0279a3e247cdc8354.tar.gz
Don't include 'toroot' path if the links are federated.
This was already accounted for in some places, but not all. Diffs as a result of this are shown in this example: cl/194983697 bug: 79054293 test: make ds-docs Change-Id: I24b2d2ba284c84f7f5d4e550c5eb837f6e2849af (cherry picked from commit 709b1f646f0234ca939c4ef7cc8e93ac32b55579)
-rw-r--r--res/assets/templates/macros.cs15
1 files changed, 12 insertions, 3 deletions
diff --git a/res/assets/templates/macros.cs b/res/assets/templates/macros.cs
index e845db2..6590b51 100644
--- a/res/assets/templates/macros.cs
+++ b/res/assets/templates/macros.cs
@@ -8,7 +8,10 @@ if:dac ?><?cs
<?cs # A link to a package ?><?cs
def:package_link(pkg) ?>
- <a href="<?cs var:toroot ?><?cs var:pkg.link ?>"><?cs var:pkg.name ?></a><?cs
+ <a href="<?cs
+ if:!pkg.federatedSite ?><?cs
+ var:toroot ?><?cs
+ /if ?><?cs var:pkg.link ?>"><?cs var:pkg.name ?></a><?cs
/def ?><?cs
# A link to a type, or not if it is a primitive type
@@ -245,7 +248,10 @@ def:see_also_tags(also) ?><?cs
<p><b>See also:</b></p>
<ul class="nolist"><?cs
each:tag=also ?><li><?cs
- if:tag.kind == "@see" ?><code><a href="<?cs var:toroot ?><?cs var:tag.href ?>"><?cs
+ if: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
@@ -310,7 +316,10 @@ def:description(obj) ?><?cs
<p><b>Related XML Attributes:</b></p>
<ul class="nolist"><?cs
each:attr=obj.attrRefs ?>
- <li><a href="<?cs var:toroot ?><?cs var:attr.href ?>"><?cs var:attr.name ?></a></li><?cs
+ <li><a href="<?cs
+ if:!attr.federatedSite ?><?cs
+ var:toroot ?><?cs
+ /if ?><?cs var:attr.href ?>"><?cs var:attr.name ?></a></li><?cs
/each ?>
</ul><?cs
/if ?><?cs