add Markdown (.md) file reader with formatting support #1698 by dcherrera

This commit is contained in:
jpirnay
2026-04-23 21:00:19 +02:00
parent e299318851
commit a90290a596
8 changed files with 1112 additions and 6 deletions
+3 -1
View File
@@ -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;