File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ module.exports = {
2121 if ( t . startsWith ( prefix ) ) return 'Source'
2222 if ( t . includes ( 'xml' ) ) return 'XML Source'
2323 if ( t . includes ( 'json' ) ) return 'JSON Source' // Like eg application/ld+json
24+ if ( t . includes ( 'javascript' ) ) return 'Javascript Source' ;
2425 }
2526 return null
2627 } ,
@@ -42,7 +43,7 @@ module.exports = {
4243 const contentType = mime . lookup ( newInstance . uri )
4344 if (
4445 ! contentType ||
45- ! ( contentType . startsWith ( 'text' ) || contentType . includes ( 'xml' ) || contentType . includes ( 'json' ) )
46+ ! ( contentType . startsWith ( 'text' ) || contentType . includes ( 'xml' ) || contentType . includes ( 'json' ) || contentType . includes ( 'javascript' )
4647 ) {
4748 const msg =
4849 'A new text file has to have an file extension like .txt .ttl .json etc.'
You can’t perform that action at this time.
0 commit comments