antonmedv / monkberry

Monkberry is a JavaScript library for building web user interfaces
https://monkberry.js.org
MIT License
1.49k stars 78 forks source link

Why endif, endfor etc. rather than end? #43

Closed chocolateboy closed 7 years ago

chocolateboy commented 7 years ago

Is there a reason why there are multiple end tags rather than simply using end? i.e. instead of:

<ol>
  {% for todos %}
    <li>
      {% if complete %}
        <del>{{ text }}</del>
      {% else %}
        <em>{{ text }}</em>
      {% endif %}
    </li>
  {% endfor %}
</ol>

- why not:

<ol>
  {% for todos %}
    <li>
      {% if complete %}
        <del>{{ text }}</del>
      {% else %}
        <em>{{ text }}</em>
      {% end %}
    </li>
  {% end %}
</ol>

?

Are there any plans to migrate to a single end tag, or any interest in a pull request to do so?

gr0uch commented 7 years ago

Seems to be inspired by PHP's endif :)

DylanPiercey commented 7 years ago

Imo makes reading easier.

antonmedv commented 7 years ago

Imo makes reading easier. Agree.

antonmedv commented 7 years ago

No plans for migrating to "end". Sorry.