summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/filter_tmpl.nim8
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/filter_tmpl.nim b/compiler/filter_tmpl.nim
index fd7ab60dc..d16639d08 100644
--- a/compiler/filter_tmpl.nim
+++ b/compiler/filter_tmpl.nim
@@ -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