Handlebars-Net/Handlebars.Net
A real .NET Handlebars engine
๐ฆ Maintenance ๐งฐ
- ### Added in missing SDK's for release @thompson-tomo (#579)
- Added in required sdk's for the release build which was missed in #578
- ### Update of TFM & dependency optimisation @thompson-tomo (#578)
- By adjusting the TFM'S we have been able to produce a package with no dependencies on the latest frameworks hence an optimised dependency graph.
- The following frameworks have been added:
- Net 6
- The following frameworks even though requested was not added:
- Net 5
- + 5 more
๐ฆ Contributors
- @oformaniuk and @thompson-tomo
๐ Changes
- ### #574 Repo readme is mirrored into nuget package @thompson-tomo (#575)
- Closes #574
โจ Features ๐
- ### Add EmbedUntrackedSources @lahma (#570)
- added `EmbedUntrackedSources` to remove one warning, see https://nuget.info/packages/Handlebars.Net/2.1.4
- ### Use PackageLicenseExpression in NuGet package @StefH (#564)
๐ Bug Fixes ๐
- ### Introduce PartialRecursionDepthLimit @RoosterDragon (#552)
- ### Allow slashes properly within escape blocks @Hoeksema (#567)
- closes #566
- The path parsing currently doesn't work properly when there are embedded slashes within an ignore block.
- This PR fixes this issue:
- No more exceptions thrown when using `//` within an escaped block
- Allowing multiple `/` to occur within an escape block without breakage
- ### Throw properly on open ignore block instead of crashing @Hoeksema (#569)
- + 4 more
๐ฆ Maintenance ๐งฐ
- ### Fix/ci @oformaniuk (#576)
๐ฆ Contributors
- @Hoeksema, @RoosterDragon, @StefH, @lahma, @oformaniuk and @thompson-tomo
โจ Features ๐
- ### Add optional 3rd argument to lookup helper @StefH (#542)
๐ฆ Contributors
- @StefH
๐ Changes
- ### Fix 535 OutOfMemoryException @anth12 (#536)
- https://github.com/Handlebars-Net/Handlebars.Net/issues/535
- The following line currently throws an OutOfMemoryException for unrecognised expressions:
- https://github.com/Handlebars-Net/Handlebars.Net/blob/01ad0e69e56331371f85a1c59c008d7ecfd06f78/source/Handlebars/Compiler/Lexer/Parsers/BlockParamsParser.cs#L28
- This PR exits the while loop when reaching the end of the end of the string reader.
- ### Rendering inline blocks are incorrectly escaped @Nisden (#538)
- This pull request demonstrates the the issue experienced in #524
๐ฆ Contributors
- @Nisden, @anth12, @rexm, @zjklee and Anthony Halliday
๐ Bug Fixes ๐
- ### Nested partial block receives correct context @zjklee (#516)
- Nested partial block receives correct context
- Issues:
- closes #515
๐ฆ Contributors
- @zjklee
๐ Changes
- ### Update readme.md to include extra projects @StefH (#509)
โจ Features ๐
- ### Introduce `SharedEnvironment` @zjklee (#514)
- Introduces `SharedEnvironment` to deal with big memory footprint when runtime has a lot of compiled templates.
- See [`SharedEnvironment`](https://github.com/Handlebars-Net/Handlebars.Net/blob/master/README.md#shared-environment) documentation for more details
- Issues:
- closes #513
๐ Bug Fixes ๐
- ### Fix collision handling in `FixedSizeDictionary` @zjklee (#512)
- In rare cases (depended on `hashcode`) as part of searching for a suitable place in the array search started from index greater than array length.
- Issues:
- closes #498
- ### Fix for `string` object property access @Dragwar (#510)
- Removed `if` condition in `ObjectDescriptor` that checked whether the type is `string`
- Issues:
- closes #457
- + 4 more
๐ฆ Contributors
- @Dragwar, @StefH, @periklis92 and @zjklee
๐ Changes
- ### An attempt to fix https://github.com/Handlebars-Net/Handlebars.Net/issues/498
- This beta release contains object pooling safety improvements
๐ฆ Contributors
- @zjklee
๐ Changes
- ### Remove duplicate AliasProviders initialization @RomainHautefeuille (#486)
โจ Features ๐
- ### Decorators implementation @zjklee (#489)
- Issues:
- closes #137
- ### Deprecate `SupportLastInObjectIterations` @orgads (#482)
๐ Bug Fixes ๐
- ### Decorators implementation @zjklee (#489)
- Issues:
- closes #380
- closes #306
- closes #300
- ### Enable support for chained path iterators @abraham-fox (#488)
- Issues:
- closes #442
- + 2 more
๐ฆ Contributors
- @RomainHautefeuille, @abraham-fox, @orgads, @zjklee
โจ Features ๐
- ### HtmlEncoding consistent with rules in handlebars.js @tommysor (#473)
- The original issue this PR was intended to solve have been fixed in PR #477.
- This PR now deals with general rules for encoding in Handlebars.Net vs handlebars.js.
- ### Support `@last` by default. @orgads (#481)
- Fixes #480
๐ Bug Fixes ๐
- ### Fix path parsing when contains `[a/b]` @zjklee (#478)
- Fixes #470
- ### `UnencodedStatementVisitor` resets value to previously existing value when done @tommysor (#477)
- Fix #468 HandlebarsDotNet.Handlebars.Configuration.NoEscape Applied Inconsistently
- This PR does not deal with the question of general rules for encoding that was brought up in #473.
- ### Issue #469 @jamesfarrugia96 (#474)
- Exposed additional helper registration overloads via static methods
๐ฆ Contributors
- @jamesfarrugia96, @orgads, @tommysor, @zjklee
๐ Bug Fixes ๐
- ### Fix memory leak at Configuration subscribers @zjklee (#456)
- What's inside:
- fixes memory leak caused by observable subscribers were not removed
- Issues:
- closes #452
๐ฆ Contributors
- @zjklee
๐ Bug Fixes ๐
- ### Allow struct collections @bsagal (#449)
- Fix bug #447
โก Performance ๐
- ### Improve performance for large arrays (10.000+) @albertschulz (#451)
- When rendering templates with large arrays, execution time grows exponentially.
- The issue originated from the cache for the iterators contained in `BoxedValues.cs`. In opposite to the desired reduced memory usage, memory usage actually also explodes for the example show above.
- This pull request removes the cache, leaving the small boxing-cache for integer values between 0 and 20. Furthermore, it adds a benchmark for the execution time.
๐ฆ Contributors
- @albertschulz, @bsagal and @zjklee
๐ Bug Fixes ๐
- ### Render layouts using `LayoutViewModel` instead of `DynamicViewModel` @heemskerkerik (#443)
- Fixes #440.
- ### `@data` object is not accessible within `layout` @zjklee (#441)
- What's inside:
- `@data` object is properly passed to `layout`
- Issues:
- closes #439
- ### Only parse comments as layout when they are not escaped @heemskerkerik (#438)
- + 2 more
๐ฆ Contributors
- @heemskerkerik and @zjklee
๐ Bug Fixes ๐
- ### Fix multiple block params in the same template in different blocks @zjklee (#436)
- What's inside:
- fixes `HandlebarsCompilerException` when template contains multiple `blockParams` in different blocks
๐ฆ Contributors
- @zjklee
๐ Changes
- ### Remove call-for-input link - V2 is out @nblumhardt (#429)
๐ Bug Fixes ๐
- ### Fix child context creation when value is `null` when invoking partials @zjklee (#433)
- What's inside:
- fix child context creation when value is `null`
- fix dependency propagation to `Enumerable` descriptor
- Issues:
- closes https://github.com/Handlebars-Net/Handlebars.Net/issues/432
- ### Properly handle empty ObjectDescriptor in hash population @zjklee (#427)
- What's inside:
- + 3 more
๐ฆ Contributors
- @nblumhardt and @zjklee
๐ Bug Fixes ๐
- ### Fix for Issue #412 @leniency (#413)
- The `ReflectionMemberAccessor` throws an exception when accessing value type members. The internal CreateGetDelegate method must specify pass-by-reference for these types.
- ### Add boundaries check to MemberAccessor responsible for `IList*` @zjklee (#409)
- Closes #408
๐ฆ Contributors
- @leniency and @zjklee
๐ Bug Fixes ๐
- ### Fix `^if`, `^unless` and `^each` @zjklee (#405)
- Closes Handlebars-Net/Handlebars.Net/issues/387
- ### Multiple fixes to path resolvement @zjklee (#403)
- What's inside:
- `@data` flows to child context
- helper names are case insensitive
- fixed context switch
- fixed problem with fallback to context when same name variable exists
- + 5 more
๐ฆ Contributors
- @zjklee
๐ Bug Fixes ๐
- ### fix #394 - get first not single @mhornbacher (#398)
- Fix for #394
- ### Fix case insensitive selection of WellKnownVariable @zjklee (#397)
- Closes https://github.com/Handlebars-Net/Handlebars.Net/issues/395
- ### Make respective classes serialize for net451 and net452 @zjklee (#396)
- Closes https://github.com/Handlebars-Net/Handlebars.Net/issues/393
๐ฆ Contributors
- @mhornbacher and @zjklee
๐ Bug Fixes ๐
- ### Fix assembly signing
๐ฆ Contributors
- @zjklee
๐ฆ Release
- For the list of changes please see change log of pre-release versions:
- [2.0.0-preview-1](https://github.com/Handlebars-Net/Handlebars.Net/releases/tag/2.0.0-preview-1)
- [2.0.0-preview-2](https://github.com/Handlebars-Net/Handlebars.Net/releases/tag/2.0.0-preview-2)
- [2.0.0-rc-1](https://github.com/Handlebars-Net/Handlebars.Net/releases/tag/2.0.0-rc-1)
- [2.0.0-rc-2](https://github.com/Handlebars-Net/Handlebars.Net/releases/tag/2.0.0-rc-2)
๐ Bug Fixes ๐
- ### Fix subscription direction for `ObjectDescriptorFactory` and `FormatterFactory`
๐ฆ Contributors
- @zjklee
โจ Features ๐
- ### Introduce `AmbientContext` @zjklee (#391)
- What's inside:
- Introduce `AmbientContext`
- Move `PathInfo` and related classes to a separate namespace
- Improve GC-friendliness: `PathInfoStore` and `ChainSegmentStore` are now associated with the compiled template instead of being static
- ### Introduce value formatters @zjklee (#390)
- What's inside:
- support for custom value formatters
- + 8 more
๐ Bug Fixes ๐
- ### Use `ParentContext` when handling `@partial-block` @zjklee (#386)
- Closes Handlebars-Net/Handlebars.Net/issues/383
๐ฅ Breaking change โ
- ### Introduce value formatters @zjklee (#390)
- changes to `ITextEncoder` interface
- use ISO 8601 formatting for DateTime
- ### Expose inner interfaces in configuration @zjklee (#388)
- Replace default collection interfaces by local equivalents. This is done to trim API surface.
- ### Introduce `Context` type @zjklee (#385)
- `context` parameters is no longer `dynamic`
- ```csharp
- + 11 more
๐ฆ Contributors
- @perlun, @sferencik, @zjklee
โจ Features ๐
- ### Introduce `IIterator` @zjklee (#381)
- What's inside:
- Introduces `IIterator` interface
- Extends `ObjectDescriptor` with iterator definition
- Issues:
- closes Handlebars-Net/Handlebars.Net/issues/372
- ### Introduce `HelperOptions` to Helper and ReturnHelper @zjklee (#378)
- What's inside:
- + 11 more
๐ Bug Fixes ๐
- ### Fix whitespace support for partials @zjklee (#382)
- Closes Handlebars-Net/Handlebars.Net/issues/217
๐ฅ Breaking change โ
- ### Introduce `HelperOptions` Helper and ReturnHelper @zjklee (#378)
- `HelperOptions` struct in block helpers renamed to `BlockHelperOptions`
- ### `@data` and `noEscape` @zjklee (#375)
- changed public API types in several places, semantic is still more or less the same
โก Performance ๐
- ### `@data` and `noEscape` @zjklee (#375)
- improved overall performance (2x - 3x faster)
- improved memory management (3x - 5x less memory allocations)
๐ฆ Contributors
- @zjklee
โจ Features ๐
- ### Infrastructure improvements @zjklee (#371)
- What's inside:
- Implement `data` property for `blockHelper`s
- Improve `blockParams` for `blockHelper`s
- Issues:
- closes Handlebars-Net/Handlebars.Net/issues/322
- closes Handlebars-Net/Handlebars.Net/issues/122
- closes Handlebars-Net/Handlebars.Net/issues/107
- + 19 more
โก Performance ๐
- ### Infrastructure improvements @zjklee (#371)
- Rework helper registration to use pub/sub approach
- Improve path resolver performance
- ### Merging fork into trunk @zjklee (#359)
- global refactoring (without breaking changes to the public API)
- use [zjklee/ExpressionShortcuts](https://github.com/zjklee/ExpressionShortcuts) to improve maintainability of Expression Trees
- improvements to extensibility
- [performance improvements](http://handlebars-net.github.io/Handlebars.Net/dev/bench/) (depends on template complexity):
- + 19 more
๐ฆ Contributors
- @zjklee
๐ Changes
- ### Minor improvements to path handling and access @alexdawes (#333)
- Ensure that path breaking respects square bracket escape characters so that objects with keys like `foo.bar` can be accessed using `{{ [foo.bar] }}` (#328)
- Only trim a single pair of square brackets from the key, and only if both exist (`[` at start of key and `]` at end)
- ### #243: Support `@last` for properties enumeration @zjklee (#330)
- The PR adds support for `@last` property for properties enumeration.
- Originally raised in #243 issue.
- ### Literals should be the correct type when passed as arguments to helpers @pmccloghrylaing (#319)
- Closes #298
- + 8 more
๐ Changes
- Support for .NET Standard 1.3, as well as back compatibility to .NET 4.0
- Lots of fixes for parsing edge cases, complex paths and arguments
- Better troubleshooting support with clearer exception messages
๐ Changes
- [Support for `@root` context variable](https://github.com/rexm/Handlebars.Net/issues/18)
- [`else` blocks can be used inside any helper, not just the built-in ones!](https://github.com/rexm/Handlebars.Net/issues/9)
- [Ability to inject a custom path resolver](https://github.com/rexm/Handlebars.Net/pull/14)
- And more...
Version 1.0 is finally out of beta and in release! Grab it via NuGet: ``` nuget install Handlebars.Net ```
