stuff-from-scratch/apps/website-generator/MarkdownContentParser.h
2024-01-02 16:14:23 +00:00

22 lines
480 B
C++

#pragma once
#include "String.h"
#include <optional>
#include Map.h
#include <filesystem>
#include "Vector.h"
using Path = std::filesystem::path;
class MarkdownDocument;
class MarkdownContentParser
{
public:
using FileMetadataItem = std::pair<String, String>;
using FileMetadata = Map<String, String>;
std::pair<FileMetadata, Ptr<MarkdownDocument>> run(const Path& path);
private:
Optional<FileMetadataItem> checkForMetadataItem(const String& line) const;
};