1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +00:00
This commit is contained in:
Jeremy Ruston 2013-07-05 22:37:55 +01:00
parent 68a87f368a
commit b51fb9cfa9
15 changed files with 21 additions and 20 deletions

View File

@ -198,7 +198,7 @@ var Command = function(params,commander,callback) {
];
if(tiddler) {
$tw.utils.each(tiddler.fields,function(field,name) {
var value = tiddler.getFieldString(name)
var value = tiddler.getFieldString(name);
if(knownFields.indexOf(name) !== -1) {
tiddlerFields[name] = value;
} else {

View File

@ -20,7 +20,7 @@ exports.backlinks = function(source,operator,options) {
// Function to check an individual title
function checkTiddler(title) {
$tw.utils.pushTop(results,options.wiki.getTiddlerBacklinks(title));
};
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {

View File

@ -29,7 +29,7 @@ exports.field = function(source,operator,options) {
results.push(title);
}
}
};
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {

View File

@ -29,7 +29,7 @@ exports.has = function(source,operator,options) {
results.push(title);
}
}
};
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {

View File

@ -20,7 +20,7 @@ exports.links = function(source,operator,options) {
// Function to check an individual title
function checkTiddler(title) {
$tw.utils.pushTop(results,options.wiki.getTiddlerLinks(title));
};
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {

View File

@ -26,7 +26,7 @@ exports.list = function(source,operator,options) {
if(match) {
results.push(title);
}
};
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {

View File

@ -26,7 +26,7 @@ exports.prefix = function(source,operator,options) {
if(match) {
results.push(title);
}
};
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {

View File

@ -29,7 +29,7 @@ exports.sameday = function(source,operator,options) {
results.push(title);
}
}
};
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {

View File

@ -29,7 +29,7 @@ exports.tag = function(source,operator,options) {
results.push(title);
}
}
};
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {

View File

@ -20,7 +20,7 @@ exports.tagging = function(source,operator,options) {
// Function to check an individual title
function checkTiddler(title) {
$tw.utils.pushTop(results,options.wiki.getTiddlersWithTag(title));
};
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {

View File

@ -23,7 +23,7 @@ exports.tags = function(source,operator,options) {
if(tiddler && tiddler.fields.tags) {
$tw.utils.pushTop(results,tiddler.fields.tags);
}
};
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {

View File

@ -29,7 +29,7 @@ exports.title = function(source,operator,options) {
results.push(title);
}
}
};
}
// Iterate through the source tiddlers
if($tw.utils.isArray(source)) {
$tw.utils.each(source,function(title) {

View File

@ -160,7 +160,7 @@ exports.parseMacroParameter = function(source,pos) {
var node = {
type: "macro-parameter",
start: pos
}
};
// Define our regexp
var reMacroParameter = /(?:([A-Za-z0-9\-_]+)\s*:)?(?:\s*(?:"([^"]*)"|'([^']*)'|\[\[([^\]]*)\]\]|([^\s>"'=]+)))/g;
// Skip whitespace
@ -197,7 +197,7 @@ exports.parseMacroInvocation = function(source,pos) {
type: "macrocall",
start: pos,
params: []
}
};
// Define our regexps
var reMacroName = /([^\s>"'=]+)/g;
// Skip whitespace

View File

@ -122,7 +122,7 @@ exports.parse = function() {
}
// Consume any whitespace following the list item
this.parser.skipWhitespace();
};
}
// Return the root element of the list
return [listStack[0]];
};

View File

@ -130,14 +130,15 @@ WikiRenderTree.prototype.checkContextRecursion = function(renderer,newContext) {
WikiRenderTree.prototype.getContextScopeId = function(renderer) {
var guidBits = [],
scopeComponents = ["tiddlerTitle","templateTitle"];
while(renderer) {
if(renderer.context) {
$tw.utils.each(renderer.context,function(field,name) {
scopeComponents = ["tiddlerTitle","templateTitle"],
processContext = function(field,name) {
if(scopeComponents.indexOf(name) !== -1) {
guidBits.push(name + ":" + field + ";");
}
});
};
while(renderer) {
if(renderer.context) {
$tw.utils.each(renderer.context,processContext);
guidBits.push("-");
}
renderer = renderer.parentRenderer;