mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-26 19:47:20 +00:00
parent
00bd6f8ee8
commit
967e2b7fef
@ -49,7 +49,7 @@ ImportVariablesWidget.prototype.execute = function(tiddlerList) {
|
|||||||
this.tiddlerList = tiddlerList || this.wiki.filterTiddlers(this.filter,this);
|
this.tiddlerList = tiddlerList || this.wiki.filterTiddlers(this.filter,this);
|
||||||
// Accumulate the <$set> widgets from each tiddler
|
// Accumulate the <$set> widgets from each tiddler
|
||||||
$tw.utils.each(this.tiddlerList,function(title) {
|
$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) {
|
if(parser) {
|
||||||
var parseTreeNode = parser.tree[0];
|
var parseTreeNode = parser.tree[0];
|
||||||
while(parseTreeNode && ["setvariable","set","parameters"].indexOf(parseTreeNode.type) !== -1) {
|
while(parseTreeNode && ["setvariable","set","parameters"].indexOf(parseTreeNode.type) !== -1) {
|
||||||
|
@ -12,6 +12,7 @@ title: Output
|
|||||||
+
|
+
|
||||||
title: Definitions
|
title: Definitions
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$set name="one" value="elephant">
|
<$set name="one" value="elephant">
|
||||||
<$set name="two" value="giraffe">
|
<$set name="two" value="giraffe">
|
||||||
</$set>
|
</$set>
|
||||||
|
@ -14,6 +14,7 @@ title: Output
|
|||||||
+
|
+
|
||||||
title: Definitions
|
title: Definitions
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
\define name() Bugs Bunny
|
\define name() Bugs Bunny
|
||||||
\procedure address()
|
\procedure address()
|
||||||
Bunny Hill
|
Bunny Hill
|
||||||
|
@ -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
|
||||||
|
[<<testproc>>]
|
||||||
|
[<<testmacro>>]
|
||||||
|
|
||||||
|
+
|
||||||
|
title: ExpectedResult
|
||||||
|
|
||||||
|
<p>This is a sentence
|
||||||
|
[This is a sentence ]
|
||||||
|
[This is a sentence ]
|
||||||
|
</p>
|
@ -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
|
||||||
|
[<<testproc>>]
|
||||||
|
[<<testmacro>>]
|
||||||
|
|
||||||
|
+
|
||||||
|
title: Definitions
|
||||||
|
|
||||||
|
\procedure testproc()
|
||||||
|
This is a sentence
|
||||||
|
\end
|
||||||
|
|
||||||
|
\define testmacro()
|
||||||
|
This is a sentence
|
||||||
|
\end
|
||||||
|
+
|
||||||
|
title: ExpectedResult
|
||||||
|
|
||||||
|
<p>This is a sentence
|
||||||
|
[This is a sentence ]
|
||||||
|
[This is a sentence ]
|
||||||
|
</p>
|
Loading…
Reference in New Issue
Block a user