Skip to content
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

Improve config checking: ensure mustache variables exist #25

Open
andykais opened this issue Jul 8, 2019 · 1 comment
Open

Improve config checking: ensure mustache variables exist #25

andykais opened this issue Jul 8, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@andykais
Copy link
Owner

andykais commented Jul 8, 2019

Using this issue as a guide: janl/mustache.js#538 it is possible to extract the variable names for a template. Therefore, I should be able to check if a given template is using valid variable names. E.g.

// check against builtin variables
"https://example.com/post/{value}/comments/{index}" // valid

// given { "input": ["search", "user"] }
"https://example.com/user/{user}/search/{search}" // valid
"https://example.com/user/{user}/search/{someotherval}" // invalid
@andykais andykais added the enhancement New feature or request label Jul 8, 2019
@andykais
Copy link
Owner Author

also useful: handlebars-lang/handlebars.js#1207. Consider using the barhandles repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant