Skip to content

Support :if, :else statements #66

@betamos

Description

@betamos

I encountered a couple of unexpected behaviors in the :if plugin.

:if foo
  %p This
:else
  %p That

would be a great feature. I understand if it's difficult to implement this in the current parsing logic.

Also :if foo will yield an error if foo is not defined on the object. You need to type something like :if typeof foo != 'undefined' now which is kind of meh.

Thanks for a great template engine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions