class TrimWhitespaceLambda implements Mustache.Lambda {

    @Override
    public void execute(Fragment fragment, Writer writer) throws IOException {
        writer.write(fragment.execute().replaceAll(WHITESPACE_REGEX, SINGLE_SPACE));
    }

}