You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<divclass="cart">There are <divclass="item">4 deer</div> in the cart</div><divclass="cart">There is <divclass="item">1 apple</div> in the cart</div>
Inflectible could be used to generate the content for cart div to inflect the verb BE (into forms are/is) and the objects (into forms deer/apple). However, a template would look like this:
website.cart(number, object) {
There [lexeme BE]<;number> <div class="item">[number] [object]<;number></div> in the cart
}
This mixes two kinds of markup: HTML and the inflectible's markup, which is bad. Of course, we could do this in multiple templates:
website.cart.pre(number, object) {
There [lexeme BE]<;number>
}
website.cart.item(number, object) {
number [object]<;number>
}
website.cart.post(number, object) {
in the cart
}
and then assemble those parts together. But there are lots of repeated and unused code (should we leave the unused arguments in the post template?).
Thus, there should be a way to divide templates into parts that operate on the same arguments and can be accessed individually.
Markup could be like this:
website.cart(number, object) {
pre {
There [lexeme BE]<;number>
}
item {
[number] [object]<;number>
}
post {
in the cart
}
}
And then another, inflection-unaware, template engine will be used to construct the HTML from these three parts.
This multipart syntax should be implemented.
The text was updated successfully, but these errors were encountered:
Consider this piece of HTML:
Inflectible could be used to generate the content for
cart
div to inflect the verb BE (into forms are/is) and the objects (into forms deer/apple). However, a template would look like this:This mixes two kinds of markup: HTML and the inflectible's markup, which is bad. Of course, we could do this in multiple templates:
and then assemble those parts together. But there are lots of repeated and unused code (should we leave the unused arguments in the
post
template?).Thus, there should be a way to divide templates into parts that operate on the same arguments and can be accessed individually.
Markup could be like this:
And then another, inflection-unaware, template engine will be used to construct the HTML from these three parts.
This multipart syntax should be implemented.
The text was updated successfully, but these errors were encountered: