2023-09-15 13:00:49 +01:00
|
|
|
#pragma once
|
2023-09-16 15:21:12 +01:00
|
|
|
|
|
|
|
#include <stdio.h>
|
2023-09-15 13:00:49 +01:00
|
|
|
#include <string>
|
2023-09-16 15:21:12 +01:00
|
|
|
#include <fstream>
|
|
|
|
#include <sstream>
|
|
|
|
|
|
|
|
#include "Libs/md4c-html.h"
|
2023-09-15 13:00:49 +01:00
|
|
|
|
2023-09-16 15:21:12 +01:00
|
|
|
/*
|
|
|
|
* Essentially just a wrapper for md4c's C code so thats its easier
|
|
|
|
* for my squishy little brain to handle
|
|
|
|
*/
|
2023-09-15 13:00:49 +01:00
|
|
|
class BlogParser
|
|
|
|
{
|
2023-09-16 15:21:12 +01:00
|
|
|
private:
|
2023-09-20 09:09:51 +01:00
|
|
|
static void writeTextToString(const MD_CHAR* text, MD_SIZE size, void* unneeded);
|
2023-09-16 15:21:12 +01:00
|
|
|
struct UserData{
|
2023-09-20 09:09:51 +01:00
|
|
|
std::string* output;
|
2023-09-16 15:21:12 +01:00
|
|
|
};
|
|
|
|
|
2023-09-15 13:00:49 +01:00
|
|
|
public:
|
2023-09-20 09:09:51 +01:00
|
|
|
std::string parse(std::string text);
|
2023-09-15 13:00:49 +01:00
|
|
|
};
|