Releases: vapor/leaf-kit
1.11.1 - Fix and add tests for `requireBody()` and `requireNoBody()`
What's Changed
Fix and add tests for requireBody()
and requireNoBody()
by @fpseverino in #133
Issue #123
- Fix and add tests for
requireBody()
andrequireNoBody()
This patch was released by @0xTim
Full Changelog: 1.11.0...1.11.1
1.11.0 - Add support for time zones in `DateTag`.
What's Changed
Add support for time zones in DateTag
. by @fpseverino in #131
Adds an additional parameter to
DateTag
that takes a time zone ID and uses it to set thetimeZone
property of theDateFormatter
.For example (as you can see in the added tests):
The date is #date(now, "yyyy-MM-dd'T'HH:mm", "America/New_York")
will be three hours ahead of:
The date is #date(now, "yyyy-MM-dd'T'HH:mm", "America/Los_Angeles")
This patch was released by @0xTim
Full Changelog: 1.10.6...1.11.0
1.10.6 - Allow escaped quotes in tag parameters
What's Changed
Allow escaped quotes in tag parameters by @roya1v in #124
Allows escaped quotes in tag parameters so you can do something like
#myCustomTag("this \"thing\" is cool")
Solves #122
This patch was released by @0xTim
Full Changelog: 1.10.5...1.10.6
1.10.5 - Fix crash with missing parameter
What's Changed
Fix crash with missing parameter by @b-nassler in #130
This line https://github.com/vapor/leaf-kit/blob/main/Sources/LeafKit/LeafParser/LeafParser.swift#L203
would cause a crash when no parameters are foundFixed issue that lead to a crash when parameters would be empty in line https://github.com/vapor/leaf-kit/blob/main/Sources/LeafKit/LeafParser/LeafParser.swift#L203
New Contributor
- @b-nassler made their first contribution in #130 🎉
This patch was released by @0xTim
Full Changelog: 1.10.4...1.10.5
1.10.4 - Fix extend not rendered when wrapped by with
What's Changed
Fix extend not rendered when wrapped by with by @benblakely in #129
When an
#extend
was wrapped by a#with
, the#extend
wasn’t rendered.Fixes #128
This patch was released by @0xTim
Full Changelog: 1.10.3...1.10.4
1.10.3 - Fix nested extend with sugar
What's Changed
Fix nested extend with sugar by @benblakely in #127
When nesting an
#extend
with two parameters, the second parameter was ignored instead of being used as context.Fixes #126
This patch was released by @gwynne
Full Changelog: 1.10.2...1.10.3
Add missing platform specifiers
This patch was authored and released by @gwynne.
Match Vapor's support
Fix error message in loop syntax
This patch was authored and released by @0xTim.
Syntax errors thrown from loops now show the correct error message!
add isEmpty tag
Extend for loops with custom index support
This patch was authored by @vzsg and released by @0xTim.
Traditionally, the for
loops in Leaf declare three variables in the loop's local context: isFirst
, isLast
and index
. The first two aren't particularly interesting, but being able to access all indices in a nested for loop situation is sometimes useful when working with two dimensions at once. Not to mention it just popped up on Discord earlier today.
This PR extends Loop with the option of renaming index
.
Example syntax:
#for(i, array in arrays):
#for(j, element in array):
(#(i), #(j)): #(element)
#endfor
#endfor
Should be semver-minor.