Knotx / knotx

Knot.x is a highly-efficient and scalable integration framework designed to build backend APIs
https://knotx.io
Apache License 2.0
126 stars 26 forks source link

Redundant <div> added while filling template with data #12

Closed michalwronowski closed 8 years ago

michalwronowski commented 8 years ago

Given following snippet:

<script data-api-type="templating" data-call-uri="/path/to/service.json" type="text/x-handlebars-template">
    <h2>{{header}}</h2>
    <div>{{body.content}}</div>
</script>

the output would be:

<div>
    <h2>Header value from service</h2>
    <div>Some body content from service</div>
</div>

Surrounding <div> should not be added, because in edge cases page can be rendered/styled incorrectly.

Expected output:

<h2>Header value from service</h2>
<div>Some body content from service</div>
malaskowski commented 8 years ago

Fixed in https://github.com/Cognifide/knotx/pull/35