Skip to content

More than one attribute between slashes does not render #5

@omensinger

Description

@omensinger

If I have more than one attribute in one line separated by slashes, slim-mustache ignores all attributes.

Working example using Mustache with Javascript:

console.log(Mustache.render('<img src="/img/{{a}}/{{b}}" />', {'a':'x', 'b':'1.jpg'}));
=> <img src="/img/x/1.jpg" />

Problem with slim-mustache:

img src="/img/~a/~b"
=> <img src="/img/{{a/~b}}" />

Using just one attribute it gets rendered:

img src="/img/~a"
=> img src="/img/x"

And

img src="/img/~b"
=> img src="/img/1.jpg"

This is how it looks like using spaces (but would not work because of the spaces):

img src="/img/ ~a/ ~b"
=> <img src="/img/ {{a}}/ {{b}}" />

This behavior isn't intended, isn't it?!

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