diff --git a/core/modules/widgets/importvariables.js b/core/modules/widgets/importvariables.js index a8bb483b6..3e1ac3fc6 100644 --- a/core/modules/widgets/importvariables.js +++ b/core/modules/widgets/importvariables.js @@ -49,7 +49,7 @@ ImportVariablesWidget.prototype.execute = function(tiddlerList) { this.tiddlerList = tiddlerList || this.wiki.filterTiddlers(this.filter,this); // Accumulate the <$set> widgets from each tiddler $tw.utils.each(this.tiddlerList,function(title) { - var parser = widgetPointer.wiki.parseTiddler(title,{parseAsInline:true, configTrimWhiteSpace:true}); + var parser = widgetPointer.wiki.parseTiddler(title,{parseAsInline:true, configTrimWhiteSpace:false}); if(parser) { var parseTreeNode = parser.tree[0]; while(parseTreeNode && ["setvariable","set","parameters"].indexOf(parseTreeNode.type) !== -1) { diff --git a/editions/test/tiddlers/tests/data/importvariables/WithSetWidgets2.tid b/editions/test/tiddlers/tests/data/importvariables/WithSetWidgets2.tid index 23fa58c57..b3ef64d7d 100644 --- a/editions/test/tiddlers/tests/data/importvariables/WithSetWidgets2.tid +++ b/editions/test/tiddlers/tests/data/importvariables/WithSetWidgets2.tid @@ -12,6 +12,7 @@ title: Output + title: Definitions +\whitespace trim <$set name="one" value="elephant"> <$set name="two" value="giraffe"> diff --git a/editions/test/tiddlers/tests/data/importvariables/WithSetWidgetsAndMacros.tid b/editions/test/tiddlers/tests/data/importvariables/WithSetWidgetsAndMacros.tid index eaa81f38c..282896c88 100644 --- a/editions/test/tiddlers/tests/data/importvariables/WithSetWidgetsAndMacros.tid +++ b/editions/test/tiddlers/tests/data/importvariables/WithSetWidgetsAndMacros.tid @@ -14,6 +14,7 @@ title: Output + title: Definitions +\whitespace trim \define name() Bugs Bunny \procedure address() Bunny Hill diff --git a/editions/test/tiddlers/tests/data/transclude/Procedures-Whitespace2.tid b/editions/test/tiddlers/tests/data/transclude/Procedures-Whitespace2.tid new file mode 100644 index 000000000..e6cd673bc --- /dev/null +++ b/editions/test/tiddlers/tests/data/transclude/Procedures-Whitespace2.tid @@ -0,0 +1,25 @@ +title: Transclude/Procedures/Whitespace2 +description: Procedures should inherit whitespace settings from definition site +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +\procedure testproc() +This is a sentence +\end + +\define testmacro() +This is a sentence +\end +This is a sentence +[<>] +[<>] + ++ +title: ExpectedResult + +

This is a sentence +[This is a sentence ] +[This is a sentence ] +

\ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/transclude/Procedures-Whitespace3.tid b/editions/test/tiddlers/tests/data/transclude/Procedures-Whitespace3.tid new file mode 100644 index 000000000..b043bceda --- /dev/null +++ b/editions/test/tiddlers/tests/data/transclude/Procedures-Whitespace3.tid @@ -0,0 +1,30 @@ +title: Transclude/Procedures/Whitespace3 +description: Procedures should inherit whitespace settings from definition site +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +\import Definitions + +This is a sentence +[<>] +[<>] + ++ +title: Definitions + +\procedure testproc() +This is a sentence +\end + +\define testmacro() +This is a sentence +\end ++ +title: ExpectedResult + +

This is a sentence +[This is a sentence ] +[This is a sentence ] +

\ No newline at end of file