Class TrimLineBreaksLambda

  • All Implemented Interfaces:
    com.samskivert.mustache.Mustache.Lambda

    public class TrimLineBreaksLambda
    extends Object
    implements com.samskivert.mustache.Mustache.Lambda
    Replaces duplicate line break characters in a fragment with single line break. Register:
     additionalProperties.put("trimLineBreaks", new TrimLineBreaksLambda());
     
    Use:
     {{#trimLineBreaks}}{{name}}{{/trimLineBreaks}}
     
    • Constructor Detail

      • TrimLineBreaksLambda

        public TrimLineBreaksLambda()
    • Method Detail

      • execute

        public void execute​(com.samskivert.mustache.Template.Fragment fragment,
                            Writer writer)
                     throws IOException
        Specified by:
        execute in interface com.samskivert.mustache.Mustache.Lambda
        Throws:
        IOException