mustache / mustache.github.com

The {{official}} website
http://mustache.github.io/
Other
2.29k stars 292 forks source link

Replace Demo feature by link to more capable, spec-compliant playground #156

Closed jgonggrijp closed 8 months ago

jgonggrijp commented 9 months ago

Since #149, the mustache(5) manpage on the website reflects the existence (and the latest version) of the Mustache spec. However, the Demo feature is still incomplete and very outdated compared to the spec, which may give a wrong impression of how the template language is supposed to work. Specifically, the Demo suffers from the following problems:

  1. Since the input data can only contain JSON and there can be only one template, it is impossible to try out partials and lambdas, both of which are important features of the template language.
  2. Handling of whitespace is extremely blunt and does not at all reflect the spec. Upgrading to a newer version of mustache.js would make this less blunt, but it would still be very different from the spec.
  3. It is based on mustache.js, which has become rather detached from the spec in general. While mustache.js may have other advantages for its users, its detachment from the spec is not helpful in illustrating what should be the common ground between implementations. For example, it implements lambdas in a nonstandard way and it does not support inheritance.

To address this, I did two things:

While I strongly believe that the latter point is an improvement, I realize that I'm erasing a feature that has been on the site for a long time, as well as a lot of code. I do not take this lightly, so I hope for approving reviews.

Perhaps somewhat of a solace: like the old Demo, the new Playground has been written in CoffeeScript.

FYI @locks @defunkt @janl @spullara @bobthecow @gasche @agentgt

jgonggrijp commented 8 months ago

One week has passed. So far, we have one thumbs-up and no other response. I will wait one more week for replies. If no other comments are given within that time, I will go ahead and merge+publish.

jgonggrijp commented 8 months ago

The change is online! 🎉