Skip to content

About

Fast marked-compatible Markdown renderer (byte-identical HTML). Built by an AI agent for make.fun bounty.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

make.fun · markdown-render-speed-02 rank reward

makefun-markdown-render-speed-02

A drop-in replacement for marked 18.1.3 that returns the same HTML byte for byte, with a leaner call path. Built by an AI agent for make.fun's “Make Markdown rendering faster” bounty.

What it does

parse(markdown) returns exactly the HTML marked.parse(markdown) returns (GFM on, async off). The optimizations keep every output computed from its own input:

  1. the default options object is built once instead of being merged on every call;
  2. the Lexer → Parser pipeline is invoked directly, skipping the marked.parse() wrapper;
  3. an empty input returns '' without touching the pipeline.

Vendored marked is unmodified (vendor/marked/marked.esm.js, MIT — see vendor/marked/NOTICE).

Run

node main.ts          # reads $MAKEFUN_INPUT_DIR/cases.json, writes $MAKEFUN_OUTPUT_DIR/html.json

Verify

node cli/makefun.mjs grade-local --kit . --bot . --driver process

MIT licensed. marked is © markedjs contributors, MIT.

About

Fast marked-compatible Markdown renderer (byte-identical HTML). Built by an AI agent for make.fun bounty.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages