Comparing version 0.5.13 to 0.5.14
@@ -34,3 +34,3 @@ var util = require('util'), | ||
if (err) { | ||
callback(new Error('file_not_found'));//errors.fileNotFound(mu.root, filename, err))); | ||
return callback(err); | ||
} | ||
@@ -37,0 +37,0 @@ |
@@ -63,3 +63,3 @@ var util = require('util'), | ||
.replace(carriageRegExp, '\r\n') | ||
.replace(newlineRegExp, '\n'); | ||
.replace(newlineRegExp, '\n'), | ||
buffer = new Buffer(Buffer.byteLength(content)); | ||
@@ -142,3 +142,3 @@ | ||
this.appendMultiContent(tagText); | ||
var type = sigil === '#' ? 'section' : 'inverted_section'; | ||
var type = sigil === '#' ? 'section' : 'inverted_section', | ||
block = ['multi']; | ||
@@ -145,0 +145,0 @@ |
@@ -91,3 +91,7 @@ var BUFFER_LENGTH = 1024 * 8; | ||
function s(val) { | ||
return typeof val === 'undefined' ? '' : val.toString(); | ||
if (val === null || typeof val === 'undefined') { | ||
return ''; | ||
} else { | ||
return val.toString(); | ||
} | ||
} | ||
@@ -111,6 +115,18 @@ | ||
var i = context.length; | ||
var names = name.split('.'); | ||
var current; | ||
walk: | ||
while (i--) { | ||
if (name in context[i]) { | ||
return context[i][name]; | ||
current = context[i]; | ||
for (var j = 0; j < names.length; j++) { | ||
if (names[j] in current) { | ||
current = current[names[j]]; | ||
} else { | ||
continue walk; | ||
} | ||
} | ||
return current; | ||
} | ||
@@ -117,0 +133,0 @@ |
{ "name": "mu2" | ||
, "description": "A Mustache template engine for Node.js" | ||
, "keywords": ["template", "mustache"] | ||
, "version" : "0.5.13" | ||
, "version" : "0.5.14" | ||
, "homepage": "http://github.com/raycmorgan/mu" | ||
@@ -6,0 +6,0 @@ , "author" : "RayMorgan <ray@rumgr.com>" |
{ | ||
admin: false | ||
admin: false, | ||
person: { | ||
name: "Jim" | ||
} | ||
} |
Not Admin. | ||
Hi Jim! |
@@ -7,3 +7,4 @@ { | ||
}, | ||
in_ca: true | ||
in_ca: true, | ||
owner: null | ||
} |
@@ -5,1 +5,3 @@ Hello Chris | ||
Well, $6000, after taxes. | ||
Love, |
@@ -23,2 +23,3 @@ var assert = require('assert'), | ||
'simple', | ||
'dot_notation', | ||
'twice', | ||
@@ -25,0 +26,0 @@ 'two_in_a_row', |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68
27624
739