Skip to content

Commit cbbec08

Browse files
committed
Cleaned linting errors and inlined regex test
1 parent e7c5bf0 commit cbbec08

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

lib/html.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ helpers.css = function(list, options) {
6363
var ext = path.extname(item);
6464
var fp = item;
6565

66-
var isExternal = /(^\/\/)|(:\/\/)/.test(item);
67-
if(!isExternal) {
66+
if (!/(^\/\/)|(:\/\/)/.test(item)) {
6867
fp = path.posix.join(assets, item);
6968
}
7069

test/html.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('html', function() {
3939
});
4040

4141
it('should not use options.assets when passing in an absolute url', function() {
42-
var actual = hbs.compile('{{{css "https://abc.com/bar.css"}}}')({options: {assets: "foo"}});
42+
var actual = hbs.compile('{{{css "https://abc.com/bar.css"}}}')({options: {assets: 'foo'}});
4343
assert.equal(actual, '<link type="text/css" rel="stylesheet" href="https://abc.com/bar.css">');
4444
});
4545

0 commit comments

Comments
 (0)