Skip to content

Top-level arrays render #30

@alexeymrkn

Description

@alexeymrkn

Could it be a problem with your project, or it is likely to be the Hogan's bug?

template.mustache

<ul>{{#.}}<li>{{.}}</li>{{/.}}</ul>

index.js

const mustache = require('mustache');
const template = require( './template.mustache');

// prints <ul><li>2</li><li>3</li></ul>
console.log(mustache.render(`<ul>{{#.}}<li>{{.}}</li>{{/.}}</ul>`, ['2', '3']));
// prints <ul></ul>
console.log(template(['2', '3']));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions