Skip to content
This repository has been archived by the owner on Jan 25, 2020. It is now read-only.

Fix interaction with escaped names in dust 2.6+ #26

Merged
merged 3 commits into from Apr 24, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -7,6 +7,5 @@ node_js:

script:
- "npm run-script cover"
- "npm run-script lint"

sudo: false
2 changes: 1 addition & 1 deletion lib/munger.js
Expand Up @@ -80,7 +80,7 @@ exports.wrapDustOnLoad = function (ext, config, needCache, app) {
if (mappedName !== name && typeof data === 'string') {
//this is a workaround, since adaro is not aware of the mapped name up the chain
//we find the dust.register line and replace the mappedName of template with original name
data = data.replace(mappedName, name);
data = data.replace(mappedName, name).replace(dustjs.escapeJs(mappedName), dustjs.escapeJs(name));
}
cb(null, data);
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -34,7 +34,7 @@
"adaro": "~0.1.5"
},
"scripts": {
"test": "tape test/*.js",
"test": "tape test/*.js && npm run lint",
"cover": "istanbul cover tape -- test/*.js",
"lint": "jshint -c .jshintrc index.js lib/ view/"
}
Expand Down