Package 

Class Indent

  • All Implemented Interfaces:

    
    public final class Indent
    
                        

    A class to help with indentation during template expansion.

    When the context object for Mustache contains: val indent: Indent(), then any references in the template to {{&indent}} will cause nothing to be output. But if the increment value accessor is invoked as a section, creating a nested context, then within that context a reference to {{&indent}} will cause 4 spaces to be output. This may be repeated to any required depth.

    Example:

    {{&indent}}This will not be indented.
    {{#indent.increment}}{{&indent}}This will be indented 4 spaces.
    {{#indent.increment}}{{&indent}}This will be indented 8 spaces.
    {{/indent.increment}}{{/indent.increment}}
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Indent()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description