Mercurial > prosody-hg
diff util/serialization.lua @ 13131:03f1509a6105
util.serialization: Add a "pretty" preset
This is the config I want 90% of the time when just showing data in the
console or so.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 09 Jun 2023 17:26:38 +0200 |
| parents | d10957394a3c |
| children | 714695c910c7 |
line wrap: on
line diff
--- a/util/serialization.lua Wed Jun 07 16:56:53 2023 +0200 +++ b/util/serialization.lua Fri Jun 09 17:26:38 2023 +0200 @@ -96,6 +96,10 @@ opt.itemlast = opt.itemlast or ""; opt.equals = opt.equals or "="; opt.unquoted = true; + elseif opt.preset == "pretty" then + opt.fatal = false; + opt.freeze = true; + opt.unquoted = true; end local fallback = opt.fallback or opt.fatal == false and nonfatal_fallback or fatal_error;
