dalgard / meteor-jade

Improved Jade compiler for Meteor
21 stars 4 forks source link

Comment inside 'with' block #3

Open avalanche1 opened 8 years ago

avalanche1 commented 8 years ago

Hi, Krisitan!

with currentPhoto
  img.ui.image(src="#{dataURL}")
else
 #noPhotoSeparator

compiles fine;

with currentPhoto
  img.ui.image(src="#{dataURL}")
//if there is no photo
else
 #noPhotoSeparator

throws Jade syntax error: Unexpected else block.

mickdekkers commented 8 years ago

Note that the comment isn't actually inside the with block. It would have to be indented one more level.

Out of curiosity, does //- if there is no photo work in that same spot?

avalanche1 commented 8 years ago

No, it does not.