Skip to content

Releases: vapor/leaf-kit

1.10.6 - Allow escaped quotes in tag parameters

13 May 13:31
547e48c
Compare
Choose a tag to compare

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

20 Mar 18:12
f6a08a1
Compare
Choose a tag to compare

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 found

Fixed 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

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

20 Mar 17:42
38e3144
Compare
Choose a tag to compare

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

08 Dec 00:18
547a134
Compare
Choose a tag to compare

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

21 Mar 21:56
13f2fc4
Compare
Choose a tag to compare
This patch was authored and released by @gwynne.

Match Vapor's support

Fix error message in loop syntax

07 Mar 13:37
62169b4
Compare
Choose a tag to compare
This patch was authored and released by @0xTim.

Syntax errors thrown from loops now show the correct error message!

add isEmpty tag

06 Mar 21:26
1eddd30
Compare
Choose a tag to compare
This patch was authored by @fananek and released by @0xTim.

Adds a new isEmpty tag for checking empty Strings. Equivalent of Swift's isEmpty

Example:

#if(isEmpty(emptyString)):
    This is an empty string.
#endif

Extend for loops with custom index support

06 Mar 20:49
139fcd5
Compare
Choose a tag to compare
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

18 Aug 15:42
c67a1b0
Compare
Choose a tag to compare
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

16 Aug 16:46
08fb9b2
Compare
Choose a tag to compare
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