Mercurial
view markdown_converter/README.md @ 268:f7b1188d5fb1
support repo rules Copilot bundle path
Match both +_repo_rules2+ and +http_archive+ Copilot CLI repository layouts during deployment and production startup.
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Fri, 07 Aug 2026 13:02:41 -0700 |
| parents | b818a4561a3c |
| children |
line wrap: on
line source
# markdown_converter Markdown to HTML converter written in C, with WASM support for browser use. ## Features - Headings, paragraphs, lists - Code blocks with syntax highlighting - Links and images - Bold, italic, inline code - Blockquotes ## Files | File | Description | |------|-------------| | `markdown_to_html.h` | Public API header | | `markdown_to_html.c` | C implementation | | `markdown_to_html.js` | JavaScript wrapper for WASM | | `markdown_to_html.css` | Default styles | | `tests/` | Test cases | ## Usage (C) ```c #include "markdown_converter/markdown_to_html.h" char* html = markdown_to_html(markdown_string); // use html... markdown_free(html); ``` ## Usage (WASM/JavaScript) ```javascript import createModule from 'markdown_converter/markdown_to_html_wasm/markdown_to_html_bin.js'; const Module = await createModule(); const toHtml = Module.cwrap('markdown_to_html', 'number', ['string']); const free = Module.cwrap('markdown_free', null, ['number']); const ptr = toHtml(markdownString); const html = Module.UTF8ToString(ptr); free(ptr); ``` ## Building ```bash bazel build //markdown_converter:markdown_to_html bazel build //markdown_converter:markdown_to_html_wasm # WASM version ```