Fixes for swift 5.8 (#42)
* Fixes for swift 5.8 * Add 5.8 to CI * More fixes
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
timeout-minutes: 15
|
||||
strategy:
|
||||
matrix:
|
||||
image: ["swift:5.9", "swift:5.10", "swiftlang/swift:nightly-6.0-jammy"]
|
||||
image: ["swift:5.8", "swift:5.9", "swift:5.10", "swiftlang/swift:nightly-6.0-jammy"]
|
||||
|
||||
container:
|
||||
image: ${{ matrix.image }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
--minversion 0.53.10
|
||||
|
||||
# Swift version
|
||||
--swiftversion 5.9
|
||||
--swiftversion 5.8
|
||||
|
||||
# file options
|
||||
--exclude .build
|
||||
|
||||
@@ -68,19 +68,21 @@ struct MustacheContext {
|
||||
|
||||
/// return context with indent and parameter information for invoking a partial
|
||||
func withPartial(indented: String?, inheriting: [String: MustacheTemplate]?) -> MustacheContext {
|
||||
let indentation: String? = if let indented {
|
||||
(self.indentation ?? "") + indented
|
||||
let indentation: String?
|
||||
if let indented {
|
||||
indentation = (self.indentation ?? "") + indented
|
||||
} else {
|
||||
self.indentation
|
||||
indentation = self.indentation
|
||||
}
|
||||
let inherits: [String: MustacheTemplate]? = if let inheriting {
|
||||
let inherits: [String: MustacheTemplate]?
|
||||
if let inheriting {
|
||||
if let originalInherits = self.inherited {
|
||||
originalInherits.merging(inheriting) { value, _ in value }
|
||||
inherits = originalInherits.merging(inheriting) { value, _ in value }
|
||||
} else {
|
||||
inheriting
|
||||
inherits = inheriting
|
||||
}
|
||||
} else {
|
||||
self.inherited
|
||||
inherits = self.inherited
|
||||
}
|
||||
return .init(
|
||||
stack: self.stack,
|
||||
@@ -95,10 +97,11 @@ struct MustacheContext {
|
||||
|
||||
/// return context with indent information for invoking an inheritance block
|
||||
func withBlockExpansion(indented: String?) -> MustacheContext {
|
||||
let indentation: String? = if let indented {
|
||||
(self.indentation ?? "") + indented
|
||||
let indentation: String?
|
||||
if let indented {
|
||||
indentation = (self.indentation ?? "") + indented
|
||||
} else {
|
||||
self.indentation
|
||||
indentation = self.indentation
|
||||
}
|
||||
return .init(
|
||||
stack: self.stack,
|
||||
|
||||
Reference in New Issue
Block a user