All Versions
10
Latest Version
Avg Release Cycle
144 days
Latest Release
15 days ago

Changelog History

  • v1.10.0

    May 16, 2020

    ref: #46 #47 #48

    🆕 New Features

    CommandLine tool has been added

    make escriptizeecho '{"name", "hoge"}.' \> vars.configecho '{{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.

  • v1.9.0

    March 18, 2020

    🆕 New Features

    • add partial_file_reader option at parse_option() ( #44 #45 )
  • v1.8.1

    December 20, 2019

    🐛 Bug fix

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

    May 23, 2019

    🆕 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 )
  • v1.7.0

    April 17, 2019

    🆕 New features

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

    More Information

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

    September 27, 2018

    🐛 Bug fix

    • 🛠 Fix incompatible typespecs of some options #28 #29

    More information

    • 🛠 Fix typos and modified doc. #30
  • v1.6.0

    August 15, 2018

    🆕 New features

    • Added new option is raise_on_partial_miss at bbmustache:parse_option() #27
    • bbmustache:option() split into bbmustache:parse_option(), bbmustache:compile_option(), bbmustache:render_option().

    🐛 Bug fix

    • 🛠 Fix that the processing does not complete, when target of partial does not exist #27

    More information

    • 🗄 bbmustache:option() is deprecated. #27
    • 👍 officially support OTP21 #25
    • 🗄 officially deprecated R16 #25
    • 🛠 Fix comment of document #23
  • v1.5.0

    August 16, 2017

    🆕 New Feature

    • #16 Added escape_fun option

      • You can disable escaping or specify your own escape.

      1> bbmustache:render(<<"{{tag}}">>, [{"tag", "<b>value</b>"}], [{escape_fun, fun(X) -> <<"==>", X/binary, "<==">> end}])). <<"==><b>value</b><==">>2> bbmustache:render(<<"{{tag}}">>, [{"tag", "<b>value</b>"}], [{escape_fun, fun(X) -> X end}])). <<"<b>value</b>">>

    • #21 Added raise_on_context_miss option

      1> bbmustache:render(<<"{{#parent}}{{child}}{{/parent}}">>, [{"parent", true}], [raise_on_context_miss]).** exception error: {context_missing,{key,<<"child">>}}

    🐛 Bug Fixes

  • v1.4.0

    October 27, 2016

    e.g.

    1\> Map = #{"a" =\> #{"one" =\> 1}, 1\>"b" =\> #{"two" =\> 2},1\>"c" =\> #{"three" =\> 3}}. #{"a" =\> #{"one" =\> 1},"b" =\> #{"two" =\> 2},"c" =\> #{"three" =\> 3}}2\> Template = \<\<"{{#a}}"2\>"{{one}}"2\>"{{#b}}"2\>"{{one}}{{two}}{{c.three}}"2\>"{{/b}}"2\>"{{/a}}"\>\>. \<\<"{{#a}}{{one}}{{#b}}{{one}}{{two}}{{c.three}}{{/b}}{{/a}}"\>\>3\> bbmustache:render(Template, Map). \<\<"1123"\>\>
    

    👀 See also:
    #17
    https://github.com/mustache/spec/blob/v1.1.3/specs/sections.yml#L56-L93

  • v1.3.1

    October 25, 2016

    e.g.

    % v1.3.01\> bbmustache:render(\<\<"{{{message}}world}"\>\>, #{"message"=\>"\<s\>hello\</s\>"}). \<\<"{\<s\>hello\</s\>world}"\>\>% v1.3.12\> bbmustache:render(\<\<"{{{message}}world}"\>\>, #{"message"=\>"\<s\>hello\</s\>"}). \<\<"{&lt;s&gt;hello&lt;/s&gt;, }"\>\>