huxerui.markdown
importNative CommonMark and GFM Markdown parser and declarative view component for HuxerUI
import huxerui.markdown;
模組名讀自上游 modules/markdown.cppm 裡的 `export module` 宣告。
mcpp add huxerui.markdown@0.3.1
用法
來自本倉庫自己的測試專案 —— CI 真的編譯並執行過,不是為了網站寫的。
// Headless C++23 module consumer test for huxerui.markdown.
// Verifies mapped macros (modules/macros.cppm), md4c C99 compilation, CommonMark/GFM
// AST + incremental parsing, source range mapping, and HuxerUI declarative Markdown views.
import std;
import huxerui.markdown;
int main() {
using namespace huxerui::markdown;
int failures = 0;
const auto check = [&](bool cond, std::string_view label) {
if (!cond) {
std::cerr << "FAILED: " << label << '\n';
++failures;
}
};
// Mapped public macro from modules/macros.cppm (re-exported by huxerui.markdown).
check(macros::HUXERUI_MARKDOWN_SOURCE_MAPPING == 1, "macro HUXERUI_MARKDOWN_SOURCE_MAPPING == 1");
// Out-of-line ParseMarkdown + ParseOptions::GitHub + AST / source mapping verification.
auto opts = ParseOptions::GitHub();
// …
tests/examples/huxerui-markdown/tests/runtime.cpp · 專案 tests/examples/huxerui-markdown
建置 · 上游資訊清單
- modules
huxerui.markdown- targets
huxerui_markdown (lib), markdown (lib)- language
c++23- manifest version
0.3.1- dependencies
huxerui- 來源
https://raw.githubusercontent.com/HuxerUI/Lib-Markdown/v0.3.1/mcpp.toml
版本
| 版本 | 平台 | 鏡像 | sha256 |
|---|---|---|---|
0.3.1 最新 |
LinuxWindowsmacOS | 來源 | 0e8be37f40b0… |