ariatemplates / hashspace

JavaScript client-side template engine
http://hashspace.ariatemplates.com
Apache License 2.0
14 stars 18 forks source link

Unexpected space inserted in class attribute expression #325

Closed divdavem closed 9 years ago

divdavem commented 9 years ago

Issue

When using class="a-{'b'}" in a template, class="a- b" is inserted in the DOM instead of class="a-b". An unexpected space is inserted between a- and b, which is not present in the original expression. This only happens for the class attribute.

HSP file

<template myTemplate()>
    <div class="a-{'b'}" data-something="a-{'b'}">Item</div>
</template>
<script>
exports.template = myTemplate;
</script> 

Plunk

Here is a plunk to reproduce this issue: http://embed.plnkr.co/yPVqWvtA4WmdNRxOawQI

Hashspace version

Tested with version fbcc30530129b8e57e466926d4dd88cd251043d1.