mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 12:01:50 +00:00
add markdown dialect (WIP) & add strikethrough and underline font styles
This commit is contained in:
parent
605d7e7897
commit
80e809f97f
15 changed files with 296 additions and 58 deletions
22
src/graphics/ui/markdown.hpp
Normal file
22
src/graphics/ui/markdown.hpp
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
struct FontStylesScheme;
|
||||
|
||||
// VoxelCore Markdown dialect
|
||||
|
||||
namespace markdown {
|
||||
|
||||
template <typename CharT>
|
||||
struct Result {
|
||||
/// @brief Text with erased markdown
|
||||
std::basic_string<CharT> text;
|
||||
/// @brief Text styles scheme
|
||||
std::unique_ptr<FontStylesScheme> styles;
|
||||
};
|
||||
|
||||
Result<char> process(std::string_view source, bool eraseMarkdown);
|
||||
Result<wchar_t> process(std::wstring_view source, bool eraseMarkdown);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue