handling if / else if / else #9

Closed
RandomEtc opened this Issue Jan 12, 2013 · 4 comments

Projects

None yet

3 participants

@RandomEtc

I get "unexpected indent" errors for an if/else if/else statement. Something like this:

<% if 'one thing': %>
foo
<% else if 'other': %>
bar
<% else: %>
baz
<% end %>

Should that work?

@baryshev
Owner

Thanks for reporting. Error resolved in version 4.3. Already available via npm.

@baryshev baryshev closed this Jan 12, 2013
@RandomEtc

Great - thanks!

@Naatan
Naatan commented Apr 2, 2014

Seems this issue is back? Reproducible on ectjs.com:

<% unless @id: %>
foo 
<% else if @id: %>
bar
<% end %>
@baryshev baryshev added a commit that referenced this issue Apr 2, 2014
@baryshev Fix for #9 7e7efad
@baryshev
Owner
baryshev commented Apr 2, 2014

Thank you for reporting. Fixed in v0.5.9.

@kuba-kubula kuba-kubula added a commit to apiaryio/ect that referenced this issue Nov 12, 2014
@kuba-kubula kuba-kubula Merge commit '0edfa8c4283153128363b53878e1bbdc4e6211c5'
* commit '0edfa8c4283153128363b53878e1bbdc4e6211c5':
  Fix bower config
  Fix typo
  Fix typo in bower.json
  Add bower integration
  Fix for #9
  Fix for #16
  Possible fix for #16
  update README.md example
  remove .ect suffix when in template include and extend
  remove suffix when res.render
  Clear cache public API
  Fix for unescaped regular expressions #47
  Remove node_modules
  RequireJS support. Fix #25.
  Update CoffeeScript version
  Fix compilation error
  Command line compiler

Conflicts:
	lib/ect.js
1a2a5b2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment