Use multiline strings

multi

t

t
This commit is contained in:
David Jennes
2018-09-20 02:12:12 +02:00
parent 1704cd2ddf
commit 0d4dee29b2
12 changed files with 291 additions and 139 deletions

View File

@@ -10,7 +10,11 @@ class IncludeNode : NodeType {
let bits = token.components()
guard bits.count == 2 || bits.count == 3 else {
throw TemplateSyntaxError("'include' tag requires one argument, the template file to be included. A second optional argument can be used to specify the context that will be passed to the included file")
throw TemplateSyntaxError("""
'include' tag requires one argument, the template file to be included. \
A second optional argument can be used to specify the context that will \
be passed to the included file
""")
}
return IncludeNode(templateName: Variable(bits[1]), includeContext: bits.count == 3 ? bits[2] : nil, token: token)