Add more safeguards 🚓🛂

This commit is contained in:
Olivier Halligon
2015-10-18 07:17:03 +02:00
parent f4ed872a45
commit 05dc420808
2 changed files with 17 additions and 11 deletions

View File

@@ -59,11 +59,9 @@ public class TokenParser {
case .Block:
let tag = token.components().first
if let parse_until = parse_until {
if parse_until(parser: self, token: token) {
if let parse_until = parse_until where parse_until(parser: self, token: token) {
prependToken(token)
return nodes
}
}
if let tag = tag, let parser = self.tags[tag] {