Skip to content

Releases: ActiveCampaign/mustachio

Support for unsigned integral data type variables

24 Jun 16:24
7ea435f
Compare
Choose a tag to compare

Improvement:

This fixes issue #21 adding support for unsigned integral data type variables in the template model. (uint, ushort, ulong)

Releasing Token Expanders

16 May 13:59
Compare
Choose a tag to compare

Breaking Changes

  • InferredTemplateModel.ToString() override has been removed. Previously, you could have used it to get the string JSON representation of the inferred model. This was done in order to remove our dependency on serializing it with Newtonsoft.Json. You can now get the un-serialized JSON object using the new method: model.GetModelRepresentation().
  • [Deprecated]: Parse methods taking as argument a bool disableContentEscaping have been marked as obsolete, in favor of new methods using a ParsingOptions object.

New Features

This release adds the ability to extend the functionality of Mustachio with new tag types via TokenExpanders, allowing users to add support for partials and custom functionality such as date formatters, localization, etc.

Improvements

  • The library has been migrated to use .NetStandard2.0.

Other Changes

  • AppVeyor was replaced with Travis CI.

Content Safety Improvements

03 Jun 14:55
Compare
Choose a tag to compare

In some cases, the built in "Content Safety" support that escapes raw values to HTML is not necessary.

This release adds a Parse() method overload that will allow {{{ . }}} and {{ . }} to behave the same way, and just output the raw model value. This improvement is necessary for some uses cases where having different behavior for those two constructs is confusing.

Corrected handling of "falsey" values.

22 Jan 14:55
Compare
Choose a tag to compare

With Mustachio, we tried to follow the specification of Mustache.js as closely as possible.

This included "flow control" through the existence or absence of "falsey" values (as defined by JS) -- null, false, 0 as well as empty arrays ([]).

However, we made a mistake in our understanding of how Mustache is defined. Mustache uses falsey values to control the flow of the template, but also, will print those values if they are included in a template. For example, this Mustache template:

{{ a_false_value }}

Would result in the string:

"false"

Mustachio had a bug where falsey values would not be printed, so the above template would result in an empty string instead of "false".

This release resolves this issue, so that Mustachio behaves the same way as Mustache when printing falsey values.

Minor fix scope error messages.

14 Sep 13:12
Compare
Choose a tag to compare
1.0.6

Adding test for inverted group variable handling.

Initial Release

03 Aug 13:55
Compare
Choose a tag to compare

Dead-simple templating based on mustache, but with a little more flavor.