mod_scansion_record: Indent stanzas in recordings
Improves readability, easier to see structure.
--- a/plugins/mod_scansion_record.lua Sun Apr 12 17:03:05 2020 +0200
+++ b/plugins/mod_scansion_record.lua Sun Apr 12 17:30:16 2020 +0200
@@ -37,8 +37,7 @@
end
local function record_stanza(stanza, session, verb)
- local flattened = tostring(stanza):gsub("><", ">\n\t<");
- -- TODO Proper prettyprinting with indentation
+ local flattened = tostring(stanza:indent(2, "\t"));
record(session.scansion_id.." "..verb..":\n\t"..flattened.."\n\n");
end