Releases: vapor/leaf-kit
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鈥檛 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.
Add #dumpContext tag
This patch was authored by @marius-se and released by @0xTim.
Adds a new tag, #dumpContext()
that renders the whole context for easy debugging
Adds a new `#with()` tag to make it easier to embed and extend tags
This patch was authored by @pontaoski and released by @0xTim.
Adds a new #with()
tag to make it easier to work with extend and embed tags:
#with(parent):
#(child)
#endwith