Skip to content

2.1.5

Compare
Choose a tag to compare
@github-actions github-actions released this 01 Apr 02:32
· 7 commits to refs/heads/master since this release
bed0c0e

Changes

Features 🚀

  • Add EmbedUntrackedSources @lahma (#570)

    I would also suggest changing to use newer GH Actions images for building so that other warnings would go away (old SDK in use). Maybe another modernization step could be removing old unsupported full framework targets and only support oldest supported net462. Adding net6.0 target would allow one target without dependency on Microsoft.Csharp.

  • Use PackageLicenseExpression in NuGet package @StefH (#564)

Bug Fixes 🐛

  • Introduce PartialRecursionDepthLimit @RoosterDragon (#552)

    When evaluating templates with partials, it is possible to recurse in the evaluation of those partials. This can be useful for dealing with tree like data, such as rendering a list of friends-of-friends-of-friends-of-etc....

    The ability to recurse can lead to stack overflows. For example if a sufficiently deep tree is provided as input data, or more simply if the partial calls itself in an infinite loop. As a stack overflow terminates the process, this is not desirable behaviour as it is an unavoidable crash.

    To resolve this a configurable PartialRecursionDepthLimit is introduced, defaulting to 100. Now when a template is evaluated a HandlebarsRuntimeException will be thrown if this limit is reached. This allows the caller to catch the exception and recover gracefully, rather than terminating the process.

  • 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

    Before, the individual segments between slashes in addition to the entire escaped block were returned by PathInfo. Now, it returns just the latter, which is correct. All existing unit tests still pass and new tests were added to exercise the failing cases in #566.

  • Throw properly on open ignore block instead of crashing @Hoeksema (#569)

    Closes #568

    Resolve the hang on compile when there is an open ignore block

    Reshuffle the logic so that the throw check for end of template is done before trying to process the char

  • Fix LiteralConverter to support long @StefH (#562)

Maintenance 🧰

Contributors

@Hoeksema, @RoosterDragon, @StefH, @lahma, @oformaniuk and @thompson-tomo