mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-31 07:32:59 +00:00 
			
		
		
		
	Linting
This commit is contained in:
		| @@ -198,7 +198,7 @@ var Command = function(params,commander,callback) { | |||||||
| 				]; | 				]; | ||||||
| 			if(tiddler) { | 			if(tiddler) { | ||||||
| 				$tw.utils.each(tiddler.fields,function(field,name) { | 				$tw.utils.each(tiddler.fields,function(field,name) { | ||||||
| 					var value = tiddler.getFieldString(name) | 					var value = tiddler.getFieldString(name); | ||||||
| 					if(knownFields.indexOf(name) !== -1) { | 					if(knownFields.indexOf(name) !== -1) { | ||||||
| 						tiddlerFields[name] = value; | 						tiddlerFields[name] = value; | ||||||
| 					} else { | 					} else { | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ exports.backlinks = function(source,operator,options) { | |||||||
| 	// Function to check an individual title | 	// Function to check an individual title | ||||||
| 	function checkTiddler(title) { | 	function checkTiddler(title) { | ||||||
| 		$tw.utils.pushTop(results,options.wiki.getTiddlerBacklinks(title)); | 		$tw.utils.pushTop(results,options.wiki.getTiddlerBacklinks(title)); | ||||||
| 	}; | 	} | ||||||
| 	// Iterate through the source tiddlers | 	// Iterate through the source tiddlers | ||||||
| 	if($tw.utils.isArray(source)) { | 	if($tw.utils.isArray(source)) { | ||||||
| 		$tw.utils.each(source,function(title) { | 		$tw.utils.each(source,function(title) { | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ exports.field = function(source,operator,options) { | |||||||
| 				results.push(title); | 				results.push(title); | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 	}; | 	} | ||||||
| 	// Iterate through the source tiddlers | 	// Iterate through the source tiddlers | ||||||
| 	if($tw.utils.isArray(source)) { | 	if($tw.utils.isArray(source)) { | ||||||
| 		$tw.utils.each(source,function(title) { | 		$tw.utils.each(source,function(title) { | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ exports.has = function(source,operator,options) { | |||||||
| 				results.push(title); | 				results.push(title); | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 	}; | 	} | ||||||
| 	// Iterate through the source tiddlers | 	// Iterate through the source tiddlers | ||||||
| 	if($tw.utils.isArray(source)) { | 	if($tw.utils.isArray(source)) { | ||||||
| 		$tw.utils.each(source,function(title) { | 		$tw.utils.each(source,function(title) { | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ exports.links = function(source,operator,options) { | |||||||
| 	// Function to check an individual title | 	// Function to check an individual title | ||||||
| 	function checkTiddler(title) { | 	function checkTiddler(title) { | ||||||
| 		$tw.utils.pushTop(results,options.wiki.getTiddlerLinks(title)); | 		$tw.utils.pushTop(results,options.wiki.getTiddlerLinks(title)); | ||||||
| 	}; | 	} | ||||||
| 	// Iterate through the source tiddlers | 	// Iterate through the source tiddlers | ||||||
| 	if($tw.utils.isArray(source)) { | 	if($tw.utils.isArray(source)) { | ||||||
| 		$tw.utils.each(source,function(title) { | 		$tw.utils.each(source,function(title) { | ||||||
|   | |||||||
| @@ -26,7 +26,7 @@ exports.list = function(source,operator,options) { | |||||||
| 		if(match) { | 		if(match) { | ||||||
| 			results.push(title); | 			results.push(title); | ||||||
| 		} | 		} | ||||||
| 	}; | 	} | ||||||
| 	// Iterate through the source tiddlers | 	// Iterate through the source tiddlers | ||||||
| 	if($tw.utils.isArray(source)) { | 	if($tw.utils.isArray(source)) { | ||||||
| 		$tw.utils.each(source,function(title) { | 		$tw.utils.each(source,function(title) { | ||||||
|   | |||||||
| @@ -26,7 +26,7 @@ exports.prefix = function(source,operator,options) { | |||||||
| 		if(match) { | 		if(match) { | ||||||
| 			results.push(title); | 			results.push(title); | ||||||
| 		} | 		} | ||||||
| 	}; | 	} | ||||||
| 	// Iterate through the source tiddlers | 	// Iterate through the source tiddlers | ||||||
| 	if($tw.utils.isArray(source)) { | 	if($tw.utils.isArray(source)) { | ||||||
| 		$tw.utils.each(source,function(title) { | 		$tw.utils.each(source,function(title) { | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ exports.sameday = function(source,operator,options) { | |||||||
| 				results.push(title); | 				results.push(title); | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 	}; | 	} | ||||||
| 	// Iterate through the source tiddlers | 	// Iterate through the source tiddlers | ||||||
| 	if($tw.utils.isArray(source)) { | 	if($tw.utils.isArray(source)) { | ||||||
| 		$tw.utils.each(source,function(title) { | 		$tw.utils.each(source,function(title) { | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ exports.tag = function(source,operator,options) { | |||||||
| 				results.push(title); | 				results.push(title); | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 	}; | 	} | ||||||
| 	// Iterate through the source tiddlers | 	// Iterate through the source tiddlers | ||||||
| 	if($tw.utils.isArray(source)) { | 	if($tw.utils.isArray(source)) { | ||||||
| 		$tw.utils.each(source,function(title) { | 		$tw.utils.each(source,function(title) { | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ exports.tagging = function(source,operator,options) { | |||||||
| 	// Function to check an individual title | 	// Function to check an individual title | ||||||
| 	function checkTiddler(title) { | 	function checkTiddler(title) { | ||||||
| 		$tw.utils.pushTop(results,options.wiki.getTiddlersWithTag(title)); | 		$tw.utils.pushTop(results,options.wiki.getTiddlersWithTag(title)); | ||||||
| 	}; | 	} | ||||||
| 	// Iterate through the source tiddlers | 	// Iterate through the source tiddlers | ||||||
| 	if($tw.utils.isArray(source)) { | 	if($tw.utils.isArray(source)) { | ||||||
| 		$tw.utils.each(source,function(title) { | 		$tw.utils.each(source,function(title) { | ||||||
|   | |||||||
| @@ -23,7 +23,7 @@ exports.tags = function(source,operator,options) { | |||||||
| 		if(tiddler && tiddler.fields.tags) { | 		if(tiddler && tiddler.fields.tags) { | ||||||
| 			$tw.utils.pushTop(results,tiddler.fields.tags); | 			$tw.utils.pushTop(results,tiddler.fields.tags); | ||||||
| 		} | 		} | ||||||
| 	}; | 	} | ||||||
| 	// Iterate through the source tiddlers | 	// Iterate through the source tiddlers | ||||||
| 	if($tw.utils.isArray(source)) { | 	if($tw.utils.isArray(source)) { | ||||||
| 		$tw.utils.each(source,function(title) { | 		$tw.utils.each(source,function(title) { | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ exports.title = function(source,operator,options) { | |||||||
| 				results.push(title); | 				results.push(title); | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 	}; | 	} | ||||||
| 	// Iterate through the source tiddlers | 	// Iterate through the source tiddlers | ||||||
| 	if($tw.utils.isArray(source)) { | 	if($tw.utils.isArray(source)) { | ||||||
| 		$tw.utils.each(source,function(title) { | 		$tw.utils.each(source,function(title) { | ||||||
|   | |||||||
| @@ -160,7 +160,7 @@ exports.parseMacroParameter = function(source,pos) { | |||||||
| 	var node = { | 	var node = { | ||||||
| 		type: "macro-parameter", | 		type: "macro-parameter", | ||||||
| 		start: pos | 		start: pos | ||||||
| 	} | 	}; | ||||||
| 	// Define our regexp | 	// Define our regexp | ||||||
| 	var reMacroParameter = /(?:([A-Za-z0-9\-_]+)\s*:)?(?:\s*(?:"([^"]*)"|'([^']*)'|\[\[([^\]]*)\]\]|([^\s>"'=]+)))/g; | 	var reMacroParameter = /(?:([A-Za-z0-9\-_]+)\s*:)?(?:\s*(?:"([^"]*)"|'([^']*)'|\[\[([^\]]*)\]\]|([^\s>"'=]+)))/g; | ||||||
| 	// Skip whitespace | 	// Skip whitespace | ||||||
| @@ -197,7 +197,7 @@ exports.parseMacroInvocation = function(source,pos) { | |||||||
| 		type: "macrocall", | 		type: "macrocall", | ||||||
| 		start: pos, | 		start: pos, | ||||||
| 		params: [] | 		params: [] | ||||||
| 	} | 	}; | ||||||
| 	// Define our regexps | 	// Define our regexps | ||||||
| 	var reMacroName = /([^\s>"'=]+)/g; | 	var reMacroName = /([^\s>"'=]+)/g; | ||||||
| 	// Skip whitespace | 	// Skip whitespace | ||||||
|   | |||||||
| @@ -122,7 +122,7 @@ exports.parse = function() { | |||||||
| 		} | 		} | ||||||
| 		// Consume any whitespace following the list item | 		// Consume any whitespace following the list item | ||||||
| 		this.parser.skipWhitespace(); | 		this.parser.skipWhitespace(); | ||||||
| 	}; | 	} | ||||||
| 	// Return the root element of the list | 	// Return the root element of the list | ||||||
| 	return [listStack[0]]; | 	return [listStack[0]]; | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -130,14 +130,15 @@ WikiRenderTree.prototype.checkContextRecursion = function(renderer,newContext) { | |||||||
|  |  | ||||||
| WikiRenderTree.prototype.getContextScopeId = function(renderer) { | WikiRenderTree.prototype.getContextScopeId = function(renderer) { | ||||||
| 	var guidBits = [], | 	var guidBits = [], | ||||||
| 		scopeComponents = ["tiddlerTitle","templateTitle"]; | 		scopeComponents = ["tiddlerTitle","templateTitle"], | ||||||
| 	while(renderer) { | 		processContext = function(field,name) { | ||||||
| 		if(renderer.context) { |  | ||||||
| 			$tw.utils.each(renderer.context,function(field,name) { |  | ||||||
| 				if(scopeComponents.indexOf(name) !== -1) { | 				if(scopeComponents.indexOf(name) !== -1) { | ||||||
| 					guidBits.push(name + ":" + field + ";"); | 					guidBits.push(name + ":" + field + ";"); | ||||||
| 				} | 				} | ||||||
| 			}); | 			}; | ||||||
|  | 	while(renderer) { | ||||||
|  | 		if(renderer.context) { | ||||||
|  | 			$tw.utils.each(renderer.context,processContext); | ||||||
| 			guidBits.push("-"); | 			guidBits.push("-"); | ||||||
| 		} | 		} | ||||||
| 		renderer = renderer.parentRenderer; | 		renderer = renderer.parentRenderer; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jeremy Ruston
					Jeremy Ruston