Skip to content

Mustache evaluation fails on props attribute if it contains a newline #924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
davidkhess opened this issue Jun 10, 2015 · 3 comments
Closed

Comments

@davidkhess
Copy link

See this fiddle:

https://jsfiddle.net/davidkhess/vh1uzs5h/3/

For formatting purposes, it would be nice to be able to use newlines in the formatting of the attribute value.

@yyx990803
Copy link
Member

Could you give an example where this is necessary? Mustache tags / directive values can only contain one expression/statement.

@davidkhess
Copy link
Author

A large constant. In this particular case, for documentation purposes the value is best kept out of the model and in the template.

attribute='{{
    [
        {
            "key": "a",
            "value": "b"
        },
        {
            "key": "c",
            "value": "d"
        },
        {
            "key": "e",
            "value": "f"
        }
    ]
}}'

@davidkhess
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants