add Markdown (.md) file reader with formatting support #1698 by dcherrera
This commit is contained in:
1 parent
e299318851
commit
a90290a596
8 files changed
+1112
-6
No files matched your search
+3
-1
@@ -40,9 +40,11 @@ std::string Txt::getTitle() const {
|
||||
size_t lastSlash = filepath.find_last_of('/');
|
||||
std::string filename = (lastSlash != std::string::npos) ? filepath.substr(lastSlash + 1) : filepath;
|
||||
|
||||
// Remove .txt extension
|
||||
// Remove .txt or .mdextension
|
||||
if (FsHelpers::hasTxtExtension(filename)) {
|
||||
filename = filename.substr(0, filename.length() - 4);
|
||||
} else if (FsHelpers::hasMarkdownExtension(filename)) {
|
||||
filename = filename.substr(0, filename.length() - 3);
|
||||
}
|
||||
|
||||
return filename;
|
||||
|
||||
Reference in new issue
Block a user