Add additional $ fallback to fmt
This commit is contained in:
parent
424532f883
commit
cde3a4f586
1 changed files with 3 additions and 1 deletions
|
|
@ -221,8 +221,10 @@ template callFormat(res, arg) {.dirty.} =
|
|||
template callFormatOption(res, arg, option) {.dirty.} =
|
||||
when compiles(format(arg, option, res)):
|
||||
format(arg, option, res)
|
||||
else:
|
||||
elif compiles(format(arg, option)):
|
||||
res.add format(arg, option)
|
||||
else:
|
||||
format($arg, option, res)
|
||||
|
||||
macro fmt*(pattern: string{lit}): untyped =
|
||||
## For a specification of the ``fmt`` macro, see the module level documentation.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue