18 Commits

Author SHA1 Message Date
T. R. Bernstein
6061715025 Adapt project for Astzweig
Some checks failed
CI / macOS (push) Has been cancelled
CI / linux (swift:6.0) (push) Has been cancelled
CI / linux (swift:6.1) (push) Has been cancelled
CI / linux (swift:6.2) (push) Has been cancelled
CI / windows (6.1) (push) Has been cancelled
2025-09-29 15:03:48 +02:00
Adam Fowler
534f9f9e60 Add testPartialInSubfolder (#72)
* Add testPartialInSubfolder

* Replace windows folder separator with mac/linux folder separator
2025-09-01 09:59:05 +01:00
Ralph Kühnert
6df64896f4 Add / as a valid partialNameChar and use it in parse (#71)
* Add / as a valid partialNameChar and use it in parse

* maybe let's not keep "bla" in the tests
2025-08-30 16:13:26 +01:00
Go Takagi
2add8847a1 Support Swift 6 mode (#65)
* Enable swift 6 mode

* Attach Sendable

* Stop async context because enumerator can use only synchronous contexts

* Fix global shared mutable state for MustacheContentTypes

* Revert "Fix global shared mutable state for MustacheContentTypes"

This reverts commit d4ccc83e07aeb48f4aa4024b71eb8e5f70131bc5.

* Use  instead of lock

* Support 5 and 6 versions

* Lock on access in Swift 6

* Support 5.9

* Revert "Support 5.9"

This reverts commit 9845b3bc448b2af7238c3ac88aabe6d764b2e667.

* Fix 5.9 compatibility

* Unify to manage the same lock logic in 5.9 and 6

* Add withLock backport in NSLock
2025-03-26 09:53:44 +00:00
hummingbird-automation[bot]
ec4ef9aa04 Update from Hummingbird Project Template (#58)
* Update from hummingbird-project-template 572d468b2cabeca286314c5a35196bd42445c8ef

* run swift-format

* Remove .swiftformat

---------

Co-authored-by: adam-fowler <adam-fowler@users.noreply.github.com>
Co-authored-by: Adam Fowler <adamfowler71@gmail.com>
2024-11-28 07:31:09 +00:00
Adam Fowler
9de71fc4d1 Update docs again 2024-09-20 10:23:54 +01:00
Adam Fowler
8726b2d119 Update docs 2024-09-20 10:22:47 +01:00
Adam Fowler
933fa3d60f Add support for proper lambdas (#48)
* Add support for proper lambdas

* Get rid of recursion

Remove renderSectionLambda as I can use renderUnescapedLambda for that.
2024-09-19 17:17:50 +01:00
Adam Fowler
8fba85e28c doc comment update 2024-09-19 11:28:57 +01:00
Adam Fowler
b6736b2ce8 Changes required by docc 2024-09-13 17:32:50 +01:00
Adam Fowler
01b1f21ed6 Dynamic names support (#49)
* Dynamic names support

* Add support for dynamic names in parent tags

* Support all dynamic names spec

* Swift 5.8 compile fix
2024-08-28 08:31:06 +01:00
Adam Fowler
cde358e364 Fixes for swift 5.8 (#42)
* Fixes for swift 5.8

* Add 5.8 to CI

* More fixes
2024-07-19 10:52:49 +01:00
Adam Fowler
5bb66ac425 Add development support for reloading templates when you render them (#30)
* Add support for reloading templates when you render them

* comment

* Ensure reload is only available in DEBUG

* move preprocessor block

* swift format

* MustacheTemplate.init?(filename:) internal

* Only pass reload flag down in DEBUG builds

* Rebase with main
2024-07-16 15:46:57 +01:00
Adam Fowler
7689de0a42 Fix issues from Inheritance spec (#36)
* Separate inheritance block and expansion

* Catch top level partial definition, and block newlines

* Add testTrailingNewLines to verify output of trailing newlines in partials

* Remove comment

* If block,partial has indentation add indent for first line

* Re-enable full sections spec

* withBlockExpansion

* Get indentation of blocks correct
2024-07-15 09:36:15 +01:00
Mahdi Bahrami
cc0eaffa06 Make MustacheSequence public (#38)
* Make `MustacheSequence` public

* `MustacheSequence` require conformance to `Sequence`

* remove protocol requirements

* `MustacheContext` revert to `internal`
2024-07-14 18:44:59 +01:00
Mahdi Bahrami
58b9c3b00c Implement Recursive Transforms (#37)
* Implement Recursive Transforms

* Correct test names

* apply suggestions

* format

* add comments

* move the parse function

* refine `parseTransforms()` function

* refinements

* format

* Swift Format again

---------

Co-authored-by: Adam Fowler <adamfowler71@gmail.com>
2024-07-14 12:49:16 +01:00
Adam Fowler
d642832ffe Make deprecations unavailable (#31) 2024-07-03 09:30:21 +01:00
Adam Fowler
2663d13ea7 Rename package to swift-mustache (#27)
* Rename package to swift-mustache

* Update CI
2024-03-15 07:28:57 +00:00