From 018e9d032374da9cb78b607d9b3570f76a0f424b Mon Sep 17 00:00:00 2001 From: Dianne Skoll Date: Sun, 23 Feb 2020 11:17:59 -0500 Subject: [PATCH] JSON can handle newlines (the literal newlines will be escaped to "\n" by the JSON writer.) --- src/dosubst.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dosubst.c b/src/dosubst.c index ce99d2ed..957c2244 100644 --- a/src/dosubst.c +++ b/src/dosubst.c @@ -644,10 +644,11 @@ int DoSubst(ParsePtr p, DynamicBuffer *dbuf, Trigger *t, TimeTrig *tt, int jul, break; case '_': - if (mode != CAL_MODE && mode != ADVANCE_MODE && !MsgCommand) + if (PsCal == PSCAL_LEVEL2 || PsCal == PSCAL_LEVEL3 || (mode != CAL_MODE && mode != ADVANCE_MODE && !MsgCommand)) { sprintf(s, "%s", NL); - else + } else { sprintf(s, " "); + } SHIP_OUT(s); break;