mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 15:09:14 +00:00
add search module
This commit is contained in:
@@ -320,6 +320,19 @@ export const Utils = {
|
||||
} else {
|
||||
return bytes + ' B';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
isMarkdownFile: function(filePath) {
|
||||
let index = filePath.lastIndexOf('.');
|
||||
if (index === -1) {
|
||||
return false;
|
||||
} else {
|
||||
let type = filePath.substring(index).toLowerCase();
|
||||
if (type === '.md' || type === '.markdown') {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user