aboutsummaryrefslogtreecommitdiffstats
path: root/include/markdown_translator.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/markdown_translator.hpp')
-rw-r--r--include/markdown_translator.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/markdown_translator.hpp b/include/markdown_translator.hpp
index 6c0c1bc..6a3b91f 100644
--- a/include/markdown_translator.hpp
+++ b/include/markdown_translator.hpp
@@ -17,6 +17,12 @@ public:
std::string processLine(const std::string& line);
private:
+ // Regex for various tags
+ const std::string headerRegexStr{"^(#{1,6})\\s+(.*)$"};
+ const std::string boldRegexStr{"\\*\\*([^\\*]+)\\*\\*|__([^_]+)__"};
+ const std::string italicRegexStr{"\\*([^\\*]+)\\*|_([^_]+)_"};
+ const std::string linkRegexStr{"\\[([^\\]]+)\\]\\(([^\\)]+)\\)"};
+ const std::string imageRegexStr{"!\\[(.*?)\\]\\(([^\\s\"]+)(\\s+\"(.*?)\")?\\)"};
// Helper functions for different markdown elements
void processMetadata(const std::vector<std::string>& lines);
std::string processHeaders(const std::string& line);
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage