machty / emblem.js

Emblem.js - Ember-friendly, indented syntax alternative for Handlebars.js
http://emblemjs.com
MIT License
1.04k stars 81 forks source link

Add support for yielded blocks in glimmer components #333

Open thec0keman opened 5 years ago

thec0keman commented 5 years ago

RFC 460 introduces the following syntax that currently does not work:

%Article
  %:title
    h1 = this.title
  %:body
    .byline = byline this.author
    .body = this.body 

=>

<Article>
  <title>
    <h1>
      {{this.title}}
    </h1>
  </title>
  <body>
    <div class="byline">
      {{byline this.author}}
    </div>
    <div class="body">
      {{this.body}}
    </div>
  </body>
</Article>

Instead of:

<Article>
  <:title>
    <h1>{{this.title}}</h1>
  </:title>
  <:body>
    <div class='byline'>{{byline this.author}}</div>
    <div class='body'>{{this.body}}</div>
  </:body>
</Article>