22 lines
480 B
C++
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;
|
|
};
|