summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Main <smain@google.com>2016-11-30 00:09:03 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-11-30 00:09:03 +0000
commit3f189e8a923947744809209ee85f8fd848826fdd (patch)
treea1dc6b3ccfd97329862088c6ab0f16689a4f4593
parent59db07aeb98f376914619b99c442d6acac8adb54 (diff)
parent61b47eabadae4f18b7d023c8ea735e0c25cc8e98 (diff)
downloadplatform_external_doclava-3f189e8a923947744809209ee85f8fd848826fdd.tar.gz
platform_external_doclava-3f189e8a923947744809209ee85f8fd848826fdd.tar.bz2
platform_external_doclava-3f189e8a923947744809209ee85f8fd848826fdd.zip
Add support for MathJax in javadocs bug: 32935028 am: 50e754182a am: d0cc54fc76
am: 61b47eabad Change-Id: I90ff4ee6621f194a4899eddcde7834517243cdfc
-rw-r--r--res/assets/templates/macros.cs4
-rw-r--r--src/com/google/doclava/Comment.java1
2 files changed, 5 insertions, 0 deletions
diff --git a/res/assets/templates/macros.cs b/res/assets/templates/macros.cs
index f403302..bcb9a1d 100644
--- a/res/assets/templates/macros.cs
+++ b/res/assets/templates/macros.cs
@@ -128,6 +128,10 @@ def:tag_list(tags) ?><?cs
elif:tag.kind == "@inheritDoc" ?><?cs # This is the case when @inheritDoc is in something
that does not inherit from anything?><?cs
elif:tag.kind == "@attr" ?><?cs
+ elif:tag.kind == "@usesMathJax" ?><?cs
+ if:devsite ?><script src="/_static/js/managed/mathjax/MathJax.js?config=TeX-AMS_SVG"></script><?cs
+ else ?><script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_SVG"></script><?cs
+ /if ?><?cs
else ?>{<?cs var:tag.name?> <?cs var:tag.text ?>}<?cs
/if ?><?cs
/each ?><?cs
diff --git a/src/com/google/doclava/Comment.java b/src/com/google/doclava/Comment.java
index c0a0e3e..6abfaad 100644
--- a/src/com/google/doclava/Comment.java
+++ b/src/com/google/doclava/Comment.java
@@ -44,6 +44,7 @@ public class Comment {
"@serial",
"@implNote",
"@implSpec",
+ "@usesMathJax",
}));
public Comment(String text, ContainerInfo base, SourcePositionInfo sp) {