diff options
Diffstat (limited to 'src/main/java/com')
5 files changed, 5 insertions, 23 deletions
diff --git a/src/main/java/com/google/devtools/build/docgen/skylark/SkylarkBuiltinMethodDoc.java b/src/main/java/com/google/devtools/build/docgen/skylark/SkylarkBuiltinMethodDoc.java index ed8492f9bb..e352fb3bc3 100644 --- a/src/main/java/com/google/devtools/build/docgen/skylark/SkylarkBuiltinMethodDoc.java +++ b/src/main/java/com/google/devtools/build/docgen/skylark/SkylarkBuiltinMethodDoc.java @@ -52,7 +52,7 @@ public final class SkylarkBuiltinMethodDoc extends SkylarkMethodDoc { } @Override - protected String getEntityDocumentation() { + public String getDocumentation() { return annotation.doc(); } diff --git a/src/main/java/com/google/devtools/build/docgen/skylark/SkylarkDoc.java b/src/main/java/com/google/devtools/build/docgen/skylark/SkylarkDoc.java index a19f86f30f..2fb39d464b 100644 --- a/src/main/java/com/google/devtools/build/docgen/skylark/SkylarkDoc.java +++ b/src/main/java/com/google/devtools/build/docgen/skylark/SkylarkDoc.java @@ -24,7 +24,6 @@ import com.google.devtools.build.lib.syntax.SkylarkList.MutableList; import com.google.devtools.build.lib.syntax.SkylarkList.Tuple; import java.util.Arrays; import java.util.Map; -import java.util.regex.Pattern; /** * Abstract class for containing documentation for a Skylark syntactic entity. @@ -40,24 +39,7 @@ abstract class SkylarkDoc { /** * Returns a string containing the formatted HTML documentation of the entity being documented. */ - public String getDocumentation() { - String doc = getEntityDocumentation(); - if (doc == null || doc.length() == 0) { - return ""; - } - - // Check if valid punctiation is not present at the end of the documentation. - if (Pattern.matches(".+[^.?!]$", doc)) { - // Add a final period. - doc += "."; - } - return doc; - } - - /** - * Returns a string containing the HTML documentation of the entity, before being post-processed. - */ - protected abstract String getEntityDocumentation(); + public abstract String getDocumentation(); protected String getTypeAnchor(Class<?> returnType, Class<?> generic1) { return getTypeAnchor(returnType) + " of " + getTypeAnchor(generic1) + "s"; diff --git a/src/main/java/com/google/devtools/build/docgen/skylark/SkylarkJavaMethodDoc.java b/src/main/java/com/google/devtools/build/docgen/skylark/SkylarkJavaMethodDoc.java index f31123741e..31951d0373 100644 --- a/src/main/java/com/google/devtools/build/docgen/skylark/SkylarkJavaMethodDoc.java +++ b/src/main/java/com/google/devtools/build/docgen/skylark/SkylarkJavaMethodDoc.java @@ -60,7 +60,7 @@ public final class SkylarkJavaMethodDoc extends SkylarkMethodDoc { } @Override - protected String getEntityDocumentation() { + public String getDocumentation() { return callable.doc(); } diff --git a/src/main/java/com/google/devtools/build/docgen/skylark/SkylarkModuleDoc.java b/src/main/java/com/google/devtools/build/docgen/skylark/SkylarkModuleDoc.java index 288873f340..abecf00c99 100644 --- a/src/main/java/com/google/devtools/build/docgen/skylark/SkylarkModuleDoc.java +++ b/src/main/java/com/google/devtools/build/docgen/skylark/SkylarkModuleDoc.java @@ -55,7 +55,7 @@ public final class SkylarkModuleDoc extends SkylarkDoc { } @Override - protected String getEntityDocumentation() { + public String getDocumentation() { return module.doc(); } diff --git a/src/main/java/com/google/devtools/build/docgen/skylark/SkylarkParamDoc.java b/src/main/java/com/google/devtools/build/docgen/skylark/SkylarkParamDoc.java index 69bb833a2d..2b4be5497f 100644 --- a/src/main/java/com/google/devtools/build/docgen/skylark/SkylarkParamDoc.java +++ b/src/main/java/com/google/devtools/build/docgen/skylark/SkylarkParamDoc.java @@ -69,7 +69,7 @@ public final class SkylarkParamDoc extends SkylarkDoc { } @Override - protected String getEntityDocumentation() { + public String getDocumentation() { return param.doc(); } } |