Skip to content

Commit b44d7ac

Browse files
committed
changes for dash application
1 parent 5929509 commit b44d7ac

5 files changed

Lines changed: 26 additions & 5 deletions

File tree

common/tidpaste.js

100644100755
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,11 @@ tiddlyclip.modules.tPaste = (function () {
433433

434434
tiddlerObj.setPageVars(pageData);
435435
tiddlerObj.setTids(patterns[i],pageData);
436+
if (tiddlerObj.hasMode("nontid")) {
437+
tiddlerObj.fields={};
438+
tiddlerObj.setPageVars(pageData);
439+
tiddlerObj.setNormal(patterns[i],pageData);
440+
}
436441
tiddlerObj.subst(patterns[i],pageData);
437442
status ("after subst");
438443
//tiddlerObj.text=userInput(tiddlerObj.text); //not used at present

plugin.info

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"title": "$:/plugins/bj/tiddlyclip",
33
"description": "include web content",
44
"author": "Jeffrey Wilkinson (aka BJ)",
5-
"version": "01.17.16",
5+
"version": "01.17.17",
66
"core-version": ">=5.1.17",
77
"source": "https://github.com/buggyj/tiddlyclip-plugin",
88
"plugin-type": "plugin",

tw5/assign.js

100644100755
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,20 @@ var Widget = require("$:/core/modules/widgets/widget.js").widget;
66
var widget = new Widget();
77
widget.wiki = $tw.wiki;
88
var doAssign = function(str) {
9-
var contents = str.replace(/\{\{(.+)\}\}/,"$1").trim();
9+
var x, contents = str.replace(/\{\{(.+)\}\}/,"$1").trim();
1010

11-
return compute(contents,widget)||str+" is undefined";
11+
x= compute(contents,widget);
12+
if (typeof x === 'string') return x;
13+
return str+" is undefined";
14+
1215
};
1316

1417
var compute = function (str, widget) {
18+
var x, subtid = str.split('->');
19+
if (subtid.length ===2) {
20+
x=widget.wiki.getSubTiddler(subtid [0],subtid [1]);console.log(JSON.stringify(x));
21+
return x? (x.fields.text) : "";
22+
};
1523
return widget.wiki.getTextReference(str);
1624
}
1725

tw5/tiddlywiki.files

100644100755
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@
5454
"module-type": "library"
5555
}
5656
},
57+
{
58+
"file": "senddelayed.js",
59+
"fields": {
60+
"type": "application/javascript",
61+
"title": "$:/plugins/bj/tiddlyclip/senddelayed.js",
62+
"tags": "$:/tags/tiddlyclip",
63+
"module-type": "library"
64+
}
65+
},
5766
{
5867
"file": "makeobj.js",
5968
"fields": {

tw5more/tiddlyclip.tid

100644100755
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ tags: $:/tags/PageTemplate
33

44
<$createclip>
55
<$tcadapter>
6-
</$createclip>
76
</$tcadapter>
8-
7+
</$createclip>

0 commit comments

Comments
 (0)