mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
Making sure we only load extension files that end with .js. Otherwise, it creates issues with vim that adds a .js.swp while editing
This commit is contained in:
parent
bc4089e5c2
commit
b460572ccb
|
@ -123,7 +123,7 @@ if (typeof module !== 'undefind' && typeof exports !== 'undefined' && typeof req
|
|||
if (fs) {
|
||||
// Search extensions folder
|
||||
var extensions = fs.readdirSync((__dirname || '.')+'/extensions').filter(function(file){
|
||||
return ~file.indexOf('.js');
|
||||
return file.match(/\.js$/);
|
||||
}).map(function(file){
|
||||
return file.replace(/\.js$/, '');
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user