File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ Resource.prototype.getType = function getType () {
5959 var hasHtmlData = ! ! this . htmlData ;
6060
6161 switch ( true ) {
62- case ext == '.html' :
62+ case ext == '.html' || ext == '.htm' :
6363 return types . html ;
6464 case ext == '.css' :
6565 case ! ext && parentType == types . css :
Original file line number Diff line number Diff line change @@ -7,10 +7,12 @@ describe('Resource', function() {
77 describe ( '#Resource' , function ( ) {
88 it ( 'should return correct type based on extension' , function ( ) {
99 var html = new Resource ( 'http://example.com' , 'index.html' ) ;
10+ var htm = new Resource ( 'http://example.com' , 'index.htm' ) ;
1011 var css = new Resource ( 'http://example.com/style.css' , 'style.css' ) ;
1112 var img = new Resource ( 'http://example.com/img/logo.png' , 'logo.png' ) ;
1213
1314 html . getType ( ) . should . be . eql ( types . html ) ;
15+ htm . getType ( ) . should . be . eql ( types . html ) ;
1416 css . getType ( ) . should . be . eql ( types . css ) ;
1517 img . getType ( ) . should . be . eql ( types . other ) ;
1618 } ) ;
You can’t perform that action at this time.
0 commit comments