notslang / jade-book

http://www.packtpub.com/create-dynamic-web-pages-using-jade/book
Do What The F*ck You Want To Public License
28 stars 4 forks source link

cover new &:attributes() syntax #16

Open queckezz opened 10 years ago

queckezz commented 10 years ago

Theres a new syntax for feeding in the given atrributes into a mixin.

So instead of writing

mixin check()
  input(attributes)

you now write

mixin check()
  input&:attributes(attributes)

see: https://github.com/visionmedia/jade/pull/1330 & https://github.com/visionmedia/jade/issues/1294

Just a hint if you didn't know already.

ForbesLindesay commented 10 years ago

Actually, it's:

mixin check()
  input&attributes(attributes)

The colon didn't belong there.