Merge branch 'master' into errors-logs-improvements
This commit is contained in:
@@ -14,7 +14,12 @@ struct Lexer {
|
||||
guard string.characters.count > 4 else { return "" }
|
||||
let start = string.index(string.startIndex, offsetBy: 2)
|
||||
let end = string.index(string.endIndex, offsetBy: -2)
|
||||
return String(string[start..<end]).trim(character: " ")
|
||||
let trimmed = String(string[start..<end])
|
||||
.components(separatedBy: "\n")
|
||||
.filter({ !$0.isEmpty })
|
||||
.map({ $0.trim(character: " ") })
|
||||
.joined(separator: " ")
|
||||
return trimmed
|
||||
}
|
||||
|
||||
if string.hasPrefix("{{") || string.hasPrefix("{%") || string.hasPrefix("{#") {
|
||||
|
||||
Reference in New Issue
Block a user