File tree Expand file tree Collapse file tree
src/main/java/com/hubspot/jinjava Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,13 +69,14 @@ private void addCodeSnippets(JinjavaDoc doc) {
6969
7070 if (docAnnotation == null ) {
7171 LOG .warn (
72- "Expression Test {} doesn't have a @{} annotation" ,
72+ "Tag {} doesn't have a @{} annotation" ,
7373 tag .getName (),
7474 JINJAVA_DOC_CLASS .getName ()
7575 );
76- doc .addExpTest (
77- new JinjavaDocExpTest (
76+ doc .addTag (
77+ new JinjavaDocTag (
7878 tag .getName (),
79+ StringUtils .isBlank (tag .getEndTagName ()),
7980 "" ,
8081 "" ,
8182 false ,
Original file line number Diff line number Diff line change 1818import com .hubspot .jinjava .doc .annotations .JinjavaDoc ;
1919import com .hubspot .jinjava .doc .annotations .JinjavaParam ;
2020import com .hubspot .jinjava .doc .annotations .JinjavaSnippet ;
21+ import com .hubspot .jinjava .doc .annotations .JinjavaTextMateSnippet ;
2122import com .hubspot .jinjava .interpret .JinjavaInterpreter ;
2223import com .hubspot .jinjava .interpret .TemplateSyntaxException ;
2324import com .hubspot .jinjava .tree .TagNode ;
4849 )
4950 }
5051)
52+ @ JinjavaTextMateSnippet (code = "{% cycle '${1:string_to_print}' %}" )
5153public class CycleTag implements Tag {
5254 public static final String TAG_NAME = "cycle" ;
5355 public static final String LOOP_INDEX = "loop.index0" ;
You can’t perform that action at this time.
0 commit comments