A parser that processes Namu Wiki's markup system. Syntax revision is based on the (ko) Namuwiki Syntax Guide accessed on 2026-06-03.
Note
math macro(TeX syntax) is not supported: The math macro is interpreted by the namumark parser without being rendered. Similar to cmark-gfm(#1, #2), math rendering is deemed out of scope for this project. We suggest utilizing front-end TeX libraries like MathJax for rendering mathematical expressions.
cmake -S . -B build
cmake --build buildThis builds both the CLI (build/namumark) and the shared C library (build/libnamumark.*).
ctest --test-dir build --output-on-failure./build/namumark [file*]Include lib/namumark.h and link against libnamumark.
#include <stdio.h>
#include <string.h>
#include "lib/namumark.h"
int main(void) {
const char *input = "== Title ==\nBody [[Page|link]]\n";
namumark_buffer output = {0};
namumark_status status = namumark_render_html(input, strlen(input), &output);
if (status != NAMUMARK_OK) {
fprintf(stderr, "%s\n", namumark_status_message(status));
return 1;
}
fwrite(output.data, 1, output.size, stdout);
namumark_buffer_free(&output);
return 0;
}The API also supports AST JSON output:
namumark_render_ast_json(input, strlen(input), &output);See docs/namumark-api.3 for the manpage source. After install, view it with:
man 3 namumark-api