Fix quoted switch, multi-line description, more caching (#642)
* Fix quoted switch, multi-line description, more caching * Incorporate feedback
This commit is contained in:
parent
6542c1ef16
commit
ca779afb20
3 changed files with 15 additions and 15 deletions
|
|
@ -75,7 +75,7 @@ template `--`*(key: untyped) =
|
|||
|
||||
template printIfLen(varName) =
|
||||
if varName.len != 0:
|
||||
iniOut &= astToStr(varName) & ": \"" & varName & "\"\n"
|
||||
iniOut &= astToStr(varName) & ": \"\"\"" & varName & "\"\"\"\n"
|
||||
|
||||
template printSeqIfLen(varName) =
|
||||
if varName.len != 0:
|
||||
|
|
@ -128,7 +128,9 @@ proc onExit*() =
|
|||
for key, val in flags.pairs:
|
||||
output &= "\"" & key & "\": ["
|
||||
for v in val:
|
||||
output &= "\"" & v & "\", "
|
||||
let v = if v.len > 0 and v[0] == '"': strutils.unescape(v)
|
||||
else: v
|
||||
output &= v.escape & ", "
|
||||
output = output[0 .. ^3] & "], "
|
||||
output = output[0 .. ^3] & "}, "
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue