Mercurial > prosody-hg
diff util/format.lua @ 11644:fc1b8fe94d04
util.format: Change formatting of nil values to avoid looking like XML
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 29 Jun 2021 16:18:31 +0200 |
| parents | 5f4a657136bc |
| children | b6ea0148ad37 |
line wrap: on
line diff
--- a/util/format.lua Tue Jun 29 16:07:57 2021 +0200 +++ b/util/format.lua Tue Jun 29 16:18:31 2021 +0200 @@ -55,7 +55,7 @@ local option = spec:sub(-1); if arg == nil then args[i] = "nil"; - spec = "<%s>"; + spec = "(%s)"; elseif option == "q" then args[i] = dump(arg); spec = "%s"; @@ -77,7 +77,7 @@ i = i + 1; local arg = args[i]; if arg == nil then - args[i] = "<nil>"; + args[i] = "(nil)"; else args[i] = tostring(arg); end
