Skip to content

Releases: canjs/can-stache

for(number) docs fix

23 Dec 03:20
Compare
Choose a tag to compare

Documented {{scope.index}} correctly.

for(integer)

23 Dec 03:18
Compare
Choose a tag to compare

PR: #709

This enables for loops to loop through numbers:

{{# for(this.count) }}
  {{ scope.index }}
{{/ for }}

Fix docs typo

12 Sep 19:50
Compare
Choose a tag to compare

fix typo for deprecated is helper to recommend eq helper as replacement

Named Partials render string result in stringOnly state

14 Aug 18:57
Compare
Choose a tag to compare

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>

#715

Allows `.` (dot) in for-of key

11 Jun 18:13
Compare
Choose a tag to compare

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.

#698

QUNIT2 upgrade

28 May 19:56
Compare
Choose a tag to compare

This updates the tests to use QUnit@2.x.x.

#690

Warn when closing magic tag is missed

22 May 21:19
Compare
Choose a tag to compare

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".

#692

Add documentation for data helper

16 May 02:46
Compare
Choose a tag to compare

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].

Handle nested call functions

25 Apr 13:12
Compare
Choose a tag to compare

Allows use of returning functions from functions

Resolves - #587

stache("{{ foo(1)(2) }}")

Simplifies whitespace control and adds an option and add links in deprecated docs