Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

namumark

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.

Build

cmake -S . -B build
cmake --build build

This builds both the CLI (build/namumark) and the shared C library (build/libnamumark.*).

Test

ctest --test-dir build --output-on-failure

Run

./build/namumark [file*]

C API

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

About

A parser that processes Namuwiki's markup system.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages