From fb12807a339510845e5a8a1b0a7feeb0f534053b Mon Sep 17 00:00:00 2001 From: Cameron Fischer Date: Mon, 9 Sep 2019 09:56:40 -0400 Subject: [PATCH] Reverting changes to stringifyList (#4249) I (Flibbles) changed it so that lists generated by stringifyList would always be compatible with a filter parser, but since lists are not, and never will be, a subset of filters, there isn't a point. More importantly, wrapping negative numbers like "-7" in brackets would mess up some math stuff. --- boot/boot.js | 2 +- editions/test/tiddlers/tests/test-utils.js | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index de5cc259b..82583c594 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -317,7 +317,7 @@ $tw.utils.stringifyList = function(value) { var result = new Array(value.length); for(var t=0, l=value.length; t{{{ [add[2]] }}}"}); + // X shouldn't be wrapped in brackets. If it is, math filters will treat it as zero. + expect(wiki.renderTiddler("text/plain","test")).toBe("-5"); + }); + it("should handle formatting a date string", function() { var fds = $tw.utils.formatDateString, // nov is month: 10!