mquandalle / meteor-jade

The Jade template engine for Meteor/Blaze
http://atmospherejs.com/mquandalle/jade
MIT License
307 stars 39 forks source link

textarea dynamic attributes and content not compiling correctly #130

Open mrjf opened 9 years ago

mrjf commented 9 years ago

I'm seeing a compilation issue when defining a Jade template (for autoform, if that matters). Textareas are not receiving contents or dynamic attributes from a helper. Here's how it's compiling:

jade:

template(name='afTextarea_custom')
  textarea($dyn=atts) #{this.value}

javascript:

Template.__checkName("afTextarea_custom");
Template["afTextarea_custom"] = new Template("Template.afTextarea_custom", (function() {
  var view = this;
  return HTML.TEXTAREA();
}));

I suspect this block but have not investigated yet:

https://github.com/mquandalle/meteor-jade/blob/master/packages/jade-compiler/lib/transpilers.js#L246-L249

mrzafod commented 9 years ago

try

template(name='afTextarea_custom')
  textarea($dyn=atts)=this.value