-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should template allow for lists of terms #20
Comments
Another good example of this is in the volume discount template, which includes a decision table like construct. |
I've been reviewing the volume discount template and I think One extension is the ability to specify a piece of repeating text One possiblity that addresses both requirements is to rely on a simple Markup for optional text with corresponding JSON field:
Markup for repeated text with corresponding JSON field:
Markup for alternative texts:
With those new constructs in mind, the decision table from the
Now if you parse the corresponding clause text with this template:
It should succeed and return with the following JSON:
|
Like it. |
An example that uses arrays in the model. |
Code that prevents using Arrays in the template model: |
Current state is that you CAN use arrays in your models - but not the template model itself. |
It would be interesting to support any arbitrary sequence of chars as separator in arrays. |
Attached is another example which is a fuel surcharge clause which is rather cumbersome as we have to define new model variables for each element in the table and we require a fixed number of rows in the table. |
We now have support for lists using blocks (tied to Markdown lists), either as: |
For instance:
The text was updated successfully, but these errors were encountered: