|
6 | 6 |
|
7 | 7 | - Added an optional second parameter to the `include` tag for passing a sub context to the included file. |
8 | 8 | [Yonas Kolb](https://github.com/yonaskolb) |
9 | | - [#394](https://github.com/stencilproject/Stencil/pull/214) |
10 | | - |
11 | | -- Adds support for using spaces in filter expression. |
| 9 | + [#214](https://github.com/stencilproject/Stencil/pull/214) |
| 10 | +- Variables now support the subscript notation. For example, if you have a variable `key = "name"`, and an |
| 11 | + object `item = ["name": "John"]`, then `{{ item[key] }}` will evaluate to "John". |
| 12 | + [David Jennes](https://github.com/djbe) |
| 13 | + [#215](https://github.com/stencilproject/Stencil/pull/215) |
| 14 | +- Adds support for using spaces in filter expression. |
12 | 15 | [Ilya Puchka](https://github.com/ilyapuchka) |
13 | 16 | [#178](https://github.com/stencilproject/Stencil/pull/178) |
14 | | - |
15 | | -- Added support for dynamic filter using `filter` filter. |
| 17 | +- Added support for dynamic filter using `filter` filter. With that you can define a variable with a name of filter |
| 18 | + , i.e. `myfilter = "uppercase"` and then use it to invoke this filter with `{{ string|filter:myfilter }}`. |
16 | 19 | [Ilya Puchka](https://github.com/ilyapuchka) |
17 | 20 | [#203](https://github.com/stencilproject/Stencil/pull/203) |
18 | 21 |
|
19 | 22 | ### Bug Fixes |
20 | 23 |
|
21 | | -- Fixed using quote as a filter parameter |
| 24 | +- Fixed using quote as a filter parameter. |
22 | 25 | [Ilya Puchka](https://github.com/ilyapuchka) |
23 | 26 | [#210](https://github.com/stencilproject/Stencil/pull/210) |
24 | 27 |
|
|
27 | 30 |
|
28 | 31 | ### Enhancements |
29 | 32 |
|
30 | | -- Added support for resolving superclass properties for not-NSObject subclasses |
| 33 | +- Added support for resolving superclass properties for not-NSObject subclasses. |
| 34 | + [Ilya Puchka](https://github.com/ilyapuchka) |
| 35 | + [#152](https://github.com/stencilproject/Stencil/pull/152) |
31 | 36 | - The `{% for %}` tag can now iterate over tuples, structures and classes via |
32 | | - their stored properties. |
33 | | -- Added `split` filter |
34 | | -- Allow default string filters to be applied to arrays |
35 | | -- Similar filters are suggested when unknown filter is used |
36 | | -- Added `indent` filter |
37 | | -- Allow using new lines inside tags |
38 | | -- Added support for iterating arrays of tuples |
39 | | -- Added support for ranges in if-in expression |
40 | | -- Added property `forloop.length` to get number of items in the loop |
41 | | -- Now you can construct ranges for loops using `a...b` syntax, i.e. `for i in 1...array.count` |
| 37 | + their stored properties. |
| 38 | + [Ilya Puchka](https://github.com/ilyapuchka) |
| 39 | + [#172](https://github.com/stencilproject/Stencil/pull/173) |
| 40 | +- Added `split` filter. |
| 41 | + [Ilya Puchka](https://github.com/ilyapuchka) |
| 42 | + [#187](https://github.com/stencilproject/Stencil/pull/187) |
| 43 | +- Allow default string filters to be applied to arrays. |
| 44 | + [Ilya Puchka](https://github.com/ilyapuchka) |
| 45 | + [#190](https://github.com/stencilproject/Stencil/pull/190) |
| 46 | +- Similar filters are suggested when unknown filter is used. |
| 47 | + [Ilya Puchka](https://github.com/ilyapuchka) |
| 48 | + [#186](https://github.com/stencilproject/Stencil/pull/186) |
| 49 | +- Added `indent` filter. |
| 50 | + [Ilya Puchka](https://github.com/ilyapuchka) |
| 51 | + [#188](https://github.com/stencilproject/Stencil/pull/188) |
| 52 | +- Allow using new lines inside tags. |
| 53 | + [Ilya Puchka](https://github.com/ilyapuchka) |
| 54 | + [#202](https://github.com/stencilproject/Stencil/pull/202) |
| 55 | +- Added support for iterating arrays of tuples. |
| 56 | + [Ilya Puchka](https://github.com/ilyapuchka) |
| 57 | + [#177](https://github.com/stencilproject/Stencil/pull/177) |
| 58 | +- Added support for ranges in if-in expression. |
| 59 | + [Ilya Puchka](https://github.com/ilyapuchka) |
| 60 | + [#193](https://github.com/stencilproject/Stencil/pull/193) |
| 61 | +- Added property `forloop.length` to get number of items in the loop. |
| 62 | + [Ilya Puchka](https://github.com/ilyapuchka) |
| 63 | + [#171](https://github.com/stencilproject/Stencil/pull/171) |
| 64 | +- Now you can construct ranges for loops using `a...b` syntax, i.e. `for i in 1...array.count`. |
| 65 | + [Ilya Puchka](https://github.com/ilyapuchka) |
| 66 | + [#192](https://github.com/stencilproject/Stencil/pull/192) |
42 | 67 |
|
43 | 68 | ### Bug Fixes |
44 | 69 |
|
45 | | -- Fixed rendering `{{ block.super }}` with several levels of inheritance |
46 | | -- Fixed checking dictionary values for nil in `default` filter |
47 | | -- Fixed comparing string variables with string literals, in Swift 4 string literals became `Substring` and thus couldn't be directly compared to strings. |
48 | | -- Integer literals now resolve into Int values, not Float |
49 | | -- Fixed accessing properties of optional properties via reflection |
50 | | -- No longer render optional values in arrays as `Optional(..)` |
51 | | -- Fixed subscription tuples by value index, i.e. `{{ tuple.0 }}` |
| 70 | +- Fixed rendering `{{ block.super }}` with several levels of inheritance. |
| 71 | + [Ilya Puchka](https://github.com/ilyapuchka) |
| 72 | + [#154](https://github.com/stencilproject/Stencil/pull/154) |
| 73 | +- Fixed checking dictionary values for nil in `default` filter. |
| 74 | + [Ilya Puchka](https://github.com/ilyapuchka) |
| 75 | + [#162](https://github.com/stencilproject/Stencil/pull/162) |
| 76 | +- Fixed comparing string variables with string literals, in Swift 4 string literals became `Substring` and thus couldn't be directly compared to strings. |
| 77 | + [Ilya Puchka](https://github.com/ilyapuchka) |
| 78 | + [#168](https://github.com/stencilproject/Stencil/pull/168) |
| 79 | +- Integer literals now resolve into Int values, not Float. |
| 80 | + [Ilya Puchka](https://github.com/ilyapuchka) |
| 81 | + [#181](https://github.com/stencilproject/Stencil/pull/181) |
| 82 | +- Fixed accessing properties of optional properties via reflection. |
| 83 | + [Ilya Puchka](https://github.com/ilyapuchka) |
| 84 | + [#204](https://github.com/stencilproject/Stencil/pull/204) |
| 85 | +- No longer render optional values in arrays as `Optional(..)`. |
| 86 | + [Ilya Puchka](https://github.com/ilyapuchka) |
| 87 | + [#205](https://github.com/stencilproject/Stencil/pull/205) |
| 88 | +- Fixed subscription tuples by value index, i.e. `{{ tuple.0 }}`. |
| 89 | + [Ilya Puchka](https://github.com/ilyapuchka) |
| 90 | + [#172](https://github.com/stencilproject/Stencil/pull/172) |
52 | 91 |
|
53 | 92 |
|
54 | 93 | ## 0.10.1 |
|
249 | 288 | ### Bug Fixes |
250 | 289 |
|
251 | 290 | - Variables (`{{ variable.5 }}`) that reference an array index at an unknown |
252 | | - index will now resolve to `nil` instead of causing a crash. |
| 291 | + index will now resolve to `nil` instead of causing a crash. |
253 | 292 | [#72](https://github.com/kylef/Stencil/issues/72) |
254 | 293 |
|
255 | | -- Templates can now extend templates that extend other templates. |
| 294 | +- Templates can now extend templates that extend other templates. |
256 | 295 | [#60](https://github.com/kylef/Stencil/issues/60) |
257 | 296 |
|
258 | 297 | - If comparisons will now treat 0 and below numbers as negative. |
|
0 commit comments