From a3bf9c0f1cc3bf41ec890e889cc7d269ec6fe893 Mon Sep 17 00:00:00 2001 From: lin onetwo Date: Wed, 12 Jun 2024 22:07:00 +0800 Subject: [PATCH] feat: support old <$transclude tiddler param --- core/modules/wiki.js | 18 +++++++++++------- .../tiddlers/tests/test-backtranscludes.js | 5 +++-- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 44e09cfde..94b3e37a4 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -559,13 +559,17 @@ exports.extractTranscludes = function(parseTreeRoot, title) { checkParseTree = function(parseTree, parentNode) { for(var t=0; t<$transclude $tiddler />"}); + text: "<$tiddler tiddler='TestIncoming'><$transclude $tiddler />\n\n<$transclude tiddler='TiddlyWiki Pre-release'/>"}); it('should have a transclude', function() { - expect(wiki.filterTiddlers('TestOutgoing +[transcludes[]]').join(',')).toBe('TestIncoming'); + expect(wiki.filterTiddlers('TestOutgoing +[transcludes[]]').join(',')).toBe('TestIncoming,TiddlyWiki Pre-release'); }); it('should have a back transclude', function() { expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('TestOutgoing'); + expect(wiki.filterTiddlers('[[TiddlyWiki Pre-release]] +[backtranscludes[]]').join(',')).toBe('TestOutgoing'); }); }); });