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

Proposal: Instream Parameters enhancement #759

Closed
srp7474 opened this issue Aug 19, 2020 · 2 comments
Closed

Proposal: Instream Parameters enhancement #759

srp7474 opened this issue Aug 19, 2020 · 2 comments

Comments

@srp7474
Copy link

srp7474 commented Aug 19, 2020

I have dropped a working enhancement into Actions. It allows parameters to be passed to a function. I found it very useful to act as conditional logic and to write an HTML generator that connected the generated HTML to the javascript supporting code.

I was not sure how if the pull request was performed the correct way. The code modification is about a dozen lines to Mustache.js plus the section added to README.md.

It may also be an implementation of issue #677

@phillipj
Copy link
Collaborator

Hi @srp7474!

Cool to see you've come up with some really handy modifications that could be really useful for others as well, thanks for sharing 👍

I'll be honest and say I'm hesitant merging them primarily because of one reason; mustache.js is supposed to be a pure JavaScript implementation of the mustache spec. That's both good and bad, it works perfectly for many but lacks a lot of trivial features for others.

In practise that means syntax wise there isn't much room creativity for things not part of the mustache spec. I believe implementations in other languages, such the PHP equivalent, has introduced a concept in its core that allows anyone to extend the mustache syntax without touching the core library, called "pragma"s I believe. Sadly we haven't come to introducing that in mustache.js yet, but for me personally that's the sensible way to introduce unofficial syntax or features.

Would love ideas on how to communicate this properly in our README.md, which could have helped set your (and future contributors) expectations earlier.

@srp7474
Copy link
Author

srp7474 commented Aug 19, 2020

Thanks Phillip for your input. What you said makes sense in the overall scheme of things.

@srp7474 srp7474 closed this as completed Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants