diff --git a/src/main/java/com/hubspot/jinjava/Jinjava.java b/src/main/java/com/hubspot/jinjava/Jinjava.java index aae8a572d..c41766c02 100644 --- a/src/main/java/com/hubspot/jinjava/Jinjava.java +++ b/src/main/java/com/hubspot/jinjava/Jinjava.java @@ -143,6 +143,13 @@ public JinjavaDoc getJinjavaDoc() { return new JinjavaDocFactory(this).get(); } + /** + * @return code snippets of all available filters, functions, and tags registered on this jinjava instance. + */ + public String getJinjavaSnippetDoc() { + return new JinjavaDocFactory(this).getCodeEditorTagSnippets(); + } + /** * Render the given template using the given context bindings. * diff --git a/src/main/java/com/hubspot/jinjava/doc/JinjavaDocFactory.java b/src/main/java/com/hubspot/jinjava/doc/JinjavaDocFactory.java index 5c490c4ed..0e85fe7a1 100644 --- a/src/main/java/com/hubspot/jinjava/doc/JinjavaDocFactory.java +++ b/src/main/java/com/hubspot/jinjava/doc/JinjavaDocFactory.java @@ -45,7 +45,7 @@ public JinjavaDoc get() { return doc; } - public String getVSCodeTagSnippets() { + public String getCodeEditorTagSnippets() { StringBuffer snippets = new StringBuffer(); for (Tag tag : jinjava.getGlobalContextCopy().getAllTags()) { if (tag instanceof EndTag) {