posthtml / posthtml-expressions

Use variables, JS-like expressions, and even markup-powered logic in your HTML.
Other
123 stars 20 forks source link

Support multiple tags for loopTags #75

Closed cossssmin closed 4 years ago

cossssmin commented 4 years ago

This PR makes it possible to actually define multiple tag names for loopTags:

loopTags: ['for', 'each']
<each loop="item in array">
  {{ item }}
</each>

<for loop="item in array">
  {{ item }}
</for>

If merged, closes #74.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 96.939% when pulling 331f5e42f5e84f3d93971d0edf1f25a2a0237113 on cossssmin:master into 3e2f583779400c28e237587acf48aa2add8f3b39 on posthtml:master.

Scrum commented 4 years ago

@cossssmin @anikethsaha Hi guys, Sorry for taking so long

Scrum commented 4 years ago

@cossssmin Could you still add a description to the documentation as a separate PR?

cossssmin commented 4 years ago

@cossssmin Could you still add a description to the documentation as a separate PR?

Sure thing, sorry about that!

cossssmin commented 4 years ago

Should I also add docs for the other options, like scopeTags?

Scrum commented 4 years ago

If it will not be difficult for you

Scrum commented 4 years ago

@cossssmin publish v1.4.0