lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Error message in do_interpolate_string_in_context()


From: Greg Chicares
Subject: Re: [lmi] Error message in do_interpolate_string_in_context()
Date: Tue, 13 Feb 2018 22:30:56 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 2018-02-13 22:18, Greg Chicares wrote:
> [Vadim--I think I've fixed this, but please take a look at SHA1 124129467]
> 
> When running inforce illustrations, Kim sees this message:
>   Invalid value '3' of section 'InforceYear' at position 3226, only 
>   "0" or "1" allowed

Vadim--Why is it that only boolean values are allowed? According to:

  https://mustache.github.io/mustache.5.html
| If the person key exists and has a non-false value, the HTML between
| the pound and slash will be rendered and displayed one or more times.

...I would have guessed that '3' would be a non-false value.

However, AIUI, we're using our own mustache implementation instead of
someone else's library, and if so...

 - Was it our intention to constrain "section" values to boolean,
   or should we expect '3' to be converted to "non-false", i.e., '1'?
   (If so, the I think we should revert my commit 124129467 and
   change our MST implementation.)

 - Might we want to support a "handlebars" alternative like
     {{#if condition}}
         one thing
     {{else}}
         another thing
     {{/if}}
   because it's a bit easier to read?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]