How to nest text and element in ember's emblem?

93 Views Asked by At

In haml the following would produce the correctly nested HTML:

%p Hi There I'm inside this paragraph
  %button I'm also inside this paragraph

Produces:

<p> Hi There I'm inside this paragraph <button>I'm also inside this paragrpah</button></p>

In Emblem.js if I do:

p Hi There I'm inside this paragraph
  %button I'm also trying to be in the paragraph

It produces this:

<p> Hi There I'm inside this paragraph %button I'm also trying to be in the paragraph</p>    

Does anyone know how to nest content and elements inside emblem.js?

1

There are 1 best solutions below

0
On
p Hi There I'm inside this paragraph
  button I'm also trying to be in the paragraph

without the % will do the trick

I can recommend checking out http://emblemjs.com/syntax/ , it's a great resource that briefly explains every possible use case.