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

Inline HTML on a line started by an element does not render #204

Closed mixonic closed 9 years ago

mixonic commented 9 years ago

From @thec0keman in https://github.com/machty/emblem.js/pull/196#issuecomment-76302220

What is the proper syntax for including escaped HTML? Prior versions of Emblem accepted p Put this text in your <head> tax, but now I believe it is trying to compile that.

I presume this means in 0.5.0-beta:

p Put this text in your <head> tax

Causes a compilation error, or otherwise does not return the expected value of:

<p>Put this text in your <head> tax</p>

<head> is not a void tag though- so I'm not even sure this is a valid template in htmlbars.

mixonic commented 9 years ago

@thec0keman I don't believe the issue you raised was a real issue. I've added a test in https://github.com/machty/emblem.js/commit/ebb5943b3fd75466dea729e81f349681ea08d5d1 that asserts inline HTML after a bare element.

Please re-open if I've missed something.

thec0keman commented 9 years ago

I looked into the issue further and I agree. The original templates that were compiling under 0.4 should not have been working in the first place. Thanks for looking into it.