Skip to content

Releases: soranoba/bbmustache

v1.12.2

11 Nov 04:23
Compare
Choose a tag to compare

Bug fixes

Others

Full Changelog: v1.12.1...v1.12.2

v1.12.1

03 May 09:41
Compare
Choose a tag to compare

Bug fixes

  • #57 Allow printing false

v1.12.0

03 May 09:22
Compare
Choose a tag to compare

Specification Update

Mustache specification v1.2.1 compatible, but Inheritence added in v1.2.0 is not currently supported. ( #56 )

Behavior Changes

Null treats as falsy

bbmustache since v1.11.0 became to treats nil as falsy.
In addition to this, null specified in the specification is also now treated as falsy.

ref: https://github.com/mustache/spec/blob/v1.2.1/specs/sections.yml#L50-L54

Print an empty string when the value is null

null and nil are now print as empty strings.
If you want to revert the behavior, you can specify any function with the value_serializer option.

ref: https://github.com/mustache/spec/blob/v1.2.1/specs/interpolation.yml#L104-L108

The behavior of Context has updated.

The behavior of Context has updated.
Make sure you get the output you want, if you are using {{.}} in mustache templates.

ref: https://github.com/mustache/spec/blob/v1.2.1/specs/sections.yml#L68-L75
ref: https://github.com/mustache/spec/blob/v1.2.1/specs/sections.yml#L92-L131

v1.11.0

15 Oct 15:18
Compare
Choose a tag to compare

Behavior changes

  • #51 #52 Treat nil and empty binaries as false in conditions ({{# xxx}} and {{^ xxx}})

Others

  • #49 OTP23 compatible

CommandLine tool has been added

16 May 18:12
Compare
Choose a tag to compare

ref: #46 #47 #48

New Features

CommandLine tool has been added

make escriptize
echo '{"name", "hoge"}.' > vars.config
echo '{{name}}' > template.mustache
./bbmustache -d vars.config template.mustache
hoge

Data files (-d) support a single assoc list, a single map, and consult format.

Note: the behind term has a high priority in all cases. it is a result of supporting to allow for embedding relative file paths as in config.

Add partial_file_reader option at parse_option

18 Mar 17:27
Compare
Choose a tag to compare

New Features

  • add partial_file_reader option at parse_option() ( #44 #45 )

Fix wrong parsing. It only affected when using closure.

20 Dec 15:10
Compare
Choose a tag to compare

Bug fix

  • Fix wrong parsing. It only affected when using closure. ( #42 #43 )

Support `{{.}}` on the top level

23 May 15:06
Compare
Choose a tag to compare

New Features

  • Support {{.}} on the top level ( #38 #40 )

More Information

  • bbmustache:data() became to equal to term(), so you should be careful if you were expecting type restrictions.
  • When it is passed an invalid data, it raise function_clause in the past, but this is gone.
    • The unsupported_term exception added in 1.7.0 is exist yet.

Others

  • Remove code to run tests on R16 ( #39 )

Add value serializer option at compile_option

17 Apr 00:30
Compare
Choose a tag to compare

New features

  • add value_serializer option at compile_option() ( #33 #34 )

More Information

  • become to raise error, if value is unsupported term. ( #35 )

Fix incompatible typespecs of some options

27 Sep 16:29
f03b295
Compare
Choose a tag to compare

Bug fix

  • Fix incompatible typespecs of some options #28 #29

More information

  • Fix typos and modified doc. #30