File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,11 @@ helpers.css = function(list, options) {
61
61
62
62
return styles . map ( function ( item ) {
63
63
var ext = path . extname ( item ) ;
64
- var fp = path . posix . join ( assets , item ) ;
64
+ var fp = item ;
65
+
66
+ if ( ! / ( ^ \/ \/ ) | ( : \/ \/ ) / . test ( item ) ) {
67
+ fp = path . posix . join ( assets , item ) ;
68
+ }
65
69
66
70
if ( ext === '.less' ) {
67
71
return '<link type="text/css" rel="stylesheet/less" href="' + fp + '">' ;
Original file line number Diff line number Diff line change @@ -38,6 +38,11 @@ describe('html', function() {
38
38
assert . equal ( actual , '<link type="text/css" rel="stylesheet" href="abc.css">' ) ;
39
39
} ) ;
40
40
41
+ 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' } } ) ;
43
+ assert . equal ( actual , '<link type="text/css" rel="stylesheet" href="https://abc.com/bar.css">' ) ;
44
+ } ) ;
45
+
41
46
it ( 'should use the `href` attribute on the hash' , function ( ) {
42
47
actual = hbs . compile ( '{{{css href=""}}}' ) ( ) ;
43
48
assert . equal ( actual , '' ) ;
You can’t perform that action at this time.
0 commit comments