Keeping JSHint on it's toes

print-window-tiddler
Jeremy Ruston 2012-01-21 14:03:03 +00:00
rodzic b96f0c1bd6
commit 61adbbf83a
2 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -300,7 +300,8 @@ Arguments for the custom template functions:
The custom template function should push the string rendering of the node to the output array, and return true, or just return false if it cannot render the node. The custom template function should push the string rendering of the node to the output array, and return true, or just return false if it cannot render the node.
*/ */
utils.renderObject = function(output,type,node,customTemplates) { utils.renderObject = function(output,type,node,customTemplates) {
var renderArrayHtml = function(output,tree) { var renderNodeHtml,
renderArrayHtml = function(output,tree) {
output.push(utils.stitchElement("ul",null,{classNames: ["treeArray"]})); output.push(utils.stitchElement("ul",null,{classNames: ["treeArray"]}));
for(var t=0; t<tree.length; t++) { for(var t=0; t<tree.length; t++) {
output.push(utils.stitchElement("li",null,{classNames: ["treeArrayMember"]})); output.push(utils.stitchElement("li",null,{classNames: ["treeArrayMember"]}));
@ -325,8 +326,8 @@ utils.renderObject = function(output,type,node,customTemplates) {
classNames: ["splitLabelRight"] classNames: ["splitLabelRight"]
})); }));
} }
output.push("</li>") output.push("</li>");
}, };
renderNodeHtml = function(output,node) { renderNodeHtml = function(output,node) {
if(node instanceof Array) { if(node instanceof Array) {
renderArrayHtml(output,node); renderArrayHtml(output,node);

Wyświetl plik

@ -22,7 +22,7 @@ exports.macro = {
switch(info) { switch(info) {
case "parsetree": case "parsetree":
return "Parse tree: " + parseTree.toString(type); return "Parse tree: " + parseTree.toString(type);
break; //break;
case "dependencies": case "dependencies":
if(parseTree.dependencies === null) { if(parseTree.dependencies === null) {
return encoder("Dependencies: *"); return encoder("Dependencies: *");