1
0
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:
shanshuirenjia
2018-12-13 20:42:51 +08:00
parent a74ada65d4
commit eb349bd2ff
6 changed files with 89 additions and 25 deletions

View File

@@ -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;
}
}
}
};