-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
Description
Right now, help generation is done via code. For small string generation it worked ok. But with time I feel it is becoming difficult to maintain the help generation code.
Templating engines are built specifically for this. You can look at a template such as this:
<ul id='products'>
{{ for product in products }}
<li>
<h2>{{ product.name }}</h2>
Price: {{ product.price }}
{{ product.description | string.truncate 15 }}
</li>
{{ end }}
</ul>
");
https://github.com/lunet-io/scriban
and know what is going to get rendered. This approach also makes it easy to intuitively change help text. The way tests are written it should not matter how help got rendered, so ideally tests should not get modified