Tidy standalone processing

This commit is contained in:
Adam Fowler
2021-03-18 12:58:48 +00:00
parent 751126d729
commit b637c4c4a4
3 changed files with 16 additions and 29 deletions

View File

@@ -8,7 +8,7 @@ extension HBMustacheTemplate {
/// - Returns: Rendered text
func render(_ stack: [Any], context: HBMustacheContext? = nil, indentation: String? = nil) -> String {
var string = ""
if let indentation = indentation {
if let indentation = indentation, indentation != "" {
for token in tokens {
if string.last == "\n" {
string += indentation