1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-09-09 06:16:06 +00:00

Rename the 'setvariable' widget to 'set'

Sleeker.
This commit is contained in:
Jermolene
2013-11-15 18:31:39 +00:00
parent 6785c49734
commit 939ad11eae
9 changed files with 40 additions and 29 deletions

View File

@@ -228,7 +228,7 @@ describe("Widget module", function() {
});
});
it("should deal with the setvariable widget", function() {
it("should deal with the set widget", function() {
var wiki = new $tw.Wiki();
// Add some tiddlers
wiki.addTiddlers([
@@ -238,7 +238,7 @@ describe("Widget module", function() {
{title: "TiddlerFour", text: "TiddlerTwo"}
]);
// Construct the widget node
var text = "My <$setvariable name='currentTiddler' value={{TiddlerFour}}><$transclude tiddler={{!!title}}/></$setvariable> is Jolly"
var text = "My <$set name='currentTiddler' value={{TiddlerFour}}><$transclude tiddler={{!!title}}/></$set> is Jolly"
var widgetNode = createWidgetNode(parseText(text,wiki),wiki);
// Render the widget node to the DOM
var wrapper = renderWidgetNode(widgetNode);

View File

@@ -98,7 +98,7 @@ describe("WikiText parser tests", function() {
it("should parse macro definitions", function() {
expect(parse("\\define myMacro()\nnothing\n\\end\n")).toEqual(
[ { type : 'setvariable', name : 'myMacro', params : [ ], text : 'nothing', attributes : { name : { type : 'string', value : 'myMacro' }, value : { type : 'string', value : 'nothing' } }, children : [ ] } ]
[ { type : 'set', name : 'myMacro', params : [ ], text : 'nothing', attributes : { name : { type : 'string', value : 'myMacro' }, value : { type : 'string', value : 'nothing' } }, children : [ ] } ]
);