leaf-kit
leaf-kit copied to clipboard
🍃 An expressive, performant, and extensible templating language built for Swift.
I tried to define a custom tag that accepts a body, but the body is provided to the tag as `[Syntax]`, which is not something that converts to the required...
These changes will make `leaf-kit` fully compatible with `-strict-concurrency=complete`.
**Is your feature request related to a problem? Please describe.** I'm currently looking for a way to add my routes in my leaf templates ``` Home # => Home ```...
Hey everyone! I've tried to implement something to make #122 work. I went with a dollar sign but if you think something else is better it should work if any...
**Is your feature request related to a problem? Please describe.** I'm using a custom tag that has a string parameter. If this parameter includes a quote, this is interpreted as...
In Leaf 3 we could loop not just over arrays from context, but we also could loop over custom tag result Now in Leaf 4: 1) `#for(language in #config("app", "languages")):`...
### Describe the bug Whilst creating a custom `UnsafeUnescapedLeafTag`, `context.requireNoBody()` always throws even if no body is provided, while `context.requireBody()` never throws even when no body is provided, rather returning...
I'm finding that the default output of a readable Leaf template includes quite a lot of unnecessary whitespace. To combat this, I'm reducing the "real" whitespace in my Leaf templates,...
This PR is some sort of mess of me deciding to make the scanner have better errors, then ending up rewriting the scanner, then ending up rewriting the parser that...
Looping through arrays is already possible via the `#for( something in array ):` syntax. But I often need to loop through dictionaries. In my projects I often have `[UUID: Codable]`...