Releases: canjs/can-stache
for(number) docs fix
Documented {{scope.index}}
correctly.
for(integer)
PR: #709
This enables for loops to loop through numbers:
{{# for(this.count) }}
{{ scope.index }}
{{/ for }}
Fix docs typo
fix typo for deprecated is
helper to recommend eq
helper as replacement
Named Partials render string result in stringOnly state
This fixes named partials to render string of DocumentFragment
in stringOnly
state, for example:
var view = stache(
'{{<addressView}}.someClass { color: #000; }{{/addressView}}' +
'<style>{{addressView()}}</style>'
);
var fragment = view();
console.log(fragment.firstChild.innerHTML); // <style>.someClass { color: #000; }</style>
Allows `.` (dot) in for-of key
This fixes an issue where the key in a for-of loop contains a dot, for example, if the data looks like this:
"Page.2" : {
pageName: "Page.2"
}
can-stache could not read/render item.pageName where item is the object above. Now the dot or dots are escaped which allows the value to be read and rendered.
QUNIT2 upgrade
This updates the tests to use [email protected].
Warn when closing magic tag is missed
Throws a warning when a magic closing tag is missed, for example:
{{# let foo="bar"}} {{foo}}
will warn with "missmatch.stache:1: closing tag {{/let}} was expected"
.
Add documentation for data helper
Resolves issue #574
Added a deprecation notice for the {{ data helper }}
@function can-stache.helpers.data {{data name}}
@parent can-stache/deprecated
@deprecated {4.3.0} Use [can-stache.helpers.domData] instead.
@signature `{{data name[ key]}}`
Adds the current [can.stache.context context] to the
element's [can.data].