mcpp index

huxerui.markdown

import

Native CommonMark and GFM Markdown parser and declarative view component for HuxerUI

import huxerui.markdown;

Module name read from the upstream `export module` declaration in modules/markdown.cppm.

mcpp add huxerui.markdown@0.3.1

Usage

From this repository's own test project — built and run by CI, not written for the website.

// 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 · project tests/examples/huxerui-markdown

Build · upstream manifest

modules
huxerui.markdown
targets
huxerui_markdown (lib), markdown (lib)
language
c++23
manifest version
0.3.1
dependencies
huxerui
source
https://raw.githubusercontent.com/HuxerUI/Lib-Markdown/v0.3.1/mcpp.toml

Versions

VersionPlatforms Mirrorssha256
0.3.1 latest LinuxWindowsmacOS source 0e8be37f40b0…