mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Linting
This commit is contained in:
parent
68a87f368a
commit
b51fb9cfa9
@ -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 {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -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]];
|
||||
};
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user