Fable
Fable copied to clipboard
Trim empty first line when using `emitStatement`, `emitJsStatement`, `emitExpr`, etc.
Description
Trimming the first empty line would allow to write:
let repeatHello (count : int) : unit =
emitStatement
count
"""
cond = count;
while cond > 0:
print("Hello from Fable!")
cond = cond - 1
"""
instead of
let repeatHello (count : int) : unit =
emitStatement
count
"""cond = count;
while cond > 0:
print("Hello from Fable!")
cond = cond - 1
"""
While keeping a really clean output without an extra empty line at the beginning or having the code not indected in the string expression.
- Fable version: 4.1.4