assetgraph
Advanced tools
Comparing version 0.3.34 to 0.3.36
@@ -38,3 +38,3 @@ var util = require('util'), | ||
alternativeExtensions: ['.template', '.php', '.xhtml', 'shtml'], | ||
alternativeExtensions: ['.template', '.php', '.xhtml', '.shtml'], | ||
@@ -41,0 +41,0 @@ isPretty: false, |
@@ -17,3 +17,20 @@ /*global require, exports*/ | ||
Relation.prototype.inline.call(this); | ||
this.node[2] = [this.to.toAst()]; | ||
var ast = this.to.toAst(); | ||
if (!this.omitFunctionCall) { | ||
ast = [ | ||
'call', | ||
[ | ||
'dot', | ||
[ | ||
'name', | ||
'one' | ||
], | ||
'getStaticUrl' | ||
], | ||
[ | ||
ast | ||
] | ||
]; | ||
} | ||
Array.prototype.splice.apply(this.node, [0, this.node.length].concat(ast)); | ||
this.from.markDirty(); | ||
@@ -20,0 +37,0 @@ return this; |
@@ -23,3 +23,7 @@ /*global require, exports*/ | ||
if (adjacentRelation && !this.wildCardValues) { | ||
var wildCardValuesRegExp = new RegExp("^(?:.*/)?" + adjacentRelation.href.replace(/^[^\*]*?\//, "").replace(/[\.\+]/g, "\\$&").replace(/\*\*?/g, '(.+?)') + "$"), | ||
// ? wildcards disabled because they're indistinguishable from GET parameters. This should work though (after the [\.\+] replace): .replace(/\?/g, '(.)') | ||
var wildCardValuesRegExp = new RegExp(adjacentRelation.to.url.replace(/[\.\+]/g, "\\$&").replace(/\*\*?/g, '(.+?)').replace(/\{([^\}]*)\}/g, function ($0, $1) { | ||
// {foo,bar} type wildcards | ||
return '(' + $1.replace(/,/g, '|') + ')'; | ||
}) + "$"), | ||
matchWildCardValues = this.to.url.match(wildCardValuesRegExp); | ||
@@ -26,0 +30,0 @@ if (matchWildCardValues) { |
@@ -11,3 +11,3 @@ var fs = require('fs'), | ||
.replace(/[?#].*$/, ''); // Strip CGI parameters and/or fragment identifier | ||
if (/[\*\?]/.test(pathname)) { | ||
if (/\*|\{.*\}/.test(pathname)) { | ||
// Expand wildcard, then expand each resulting url | ||
@@ -14,0 +14,0 @@ return glob.glob(pathname, passError(cb, function (fsPaths) { |
@@ -5,3 +5,3 @@ { | ||
"repository": "git://github.com/One-com/assetgraph.git", | ||
"version": "0.3.34", | ||
"version": "0.3.36", | ||
"maintainers": [ | ||
@@ -8,0 +8,0 @@ { |
317897
6743