better treatment of var/let/const/type sections in the templating system
This commit is contained in:
parent
b21dda385c
commit
905fb85789
1 changed files with 7 additions and 1 deletions
|
|
@ -98,7 +98,13 @@ proc parseLine(p: var TTmplParser) =
|
|||
of wElif, wOf, wElse, wExcept, wFinally:
|
||||
LLStreamWrite(p.outp, repeatChar(p.indent - 2))
|
||||
LLStreamWrite(p.outp, substr(p.x, d))
|
||||
else:
|
||||
of wLet, wVar, wConst, wType:
|
||||
LLStreamWrite(p.outp, repeatChar(p.indent))
|
||||
LLStreamWrite(p.outp, substr(p.x, d))
|
||||
if not p.x.contains({':', '='}):
|
||||
# no inline element --> treat as block:
|
||||
inc(p.indent, 2)
|
||||
else:
|
||||
LLStreamWrite(p.outp, repeatChar(p.indent))
|
||||
LLStreamWrite(p.outp, substr(p.x, d))
|
||||
p.state = psDirective
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue