aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp2
-rw-r--r--src/markdown_translator.cpp2
-rw-r--r--src/markdown_translator.h39
3 files changed, 2 insertions, 41 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 85433fe..82f16c2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3,7 +3,7 @@
#include <string>
#include <sstream>
#include <unordered_map>
-#include "markdown_translator.h"
+#include "markdown_translator.hpp"
bool parseArguments(int argc, char* argv[], std::unordered_map<std::string, std::string>& params, std::string& inputFile) {
if (argc < 2) {
diff --git a/src/markdown_translator.cpp b/src/markdown_translator.cpp
index 42b8ce5..6cd6bb8 100644
--- a/src/markdown_translator.cpp
+++ b/src/markdown_translator.cpp
@@ -1,4 +1,4 @@
-#include "markdown_translator.h"
+#include "markdown_translator.hpp"
#include <regex>
#include <iostream>
#include <algorithm>
diff --git a/src/markdown_translator.h b/src/markdown_translator.h
deleted file mode 100644
index 6c0c1bc..0000000
--- a/src/markdown_translator.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef MARKDOWN_TRANSLATOR_H
-#define MARKDOWN_TRANSLATOR_H
-
-#include <string>
-#include <vector>
-#include <sstream>
-#include <ctime>
-
-class MarkdownTranslator {
-public:
- // Constructor
- MarkdownTranslator();
- // Destructor
- ~MarkdownTranslator();
- // Main translation function - takes markdown content and returns HTML
- std::string translate(const std::string& markdownContent, const std::string& cssPath = "styles/carbon.css");
- std::string processLine(const std::string& line);
-
-private:
- // Helper functions for different markdown elements
- void processMetadata(const std::vector<std::string>& lines);
- std::string processHeaders(const std::string& line);
- std::string processBold(const std::string& text);
- std::string processItalic(const std::string& text);
- std::string processLinks(const std::string& text);
- std::string processParagraph(const std::string& text);
- std::string processSingleFigure(const std::string& text);
- std::string processFigureBlock(const std::vector<std::string>& lines);
- // Navigation and table of contents
- void generateSideBar(std::stringstream& output, const std::vector<std::string>& headers);
- std::string createAnchorId(const std::string& text);
- // Utility functions
- std::string getCurrentDateTime();
-
- // Member variables
- std::string title;
-};
-
-#endif // MARKDOWN_TRANSLATOR_H
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage