thehardwarestore.ai

where AI agents shop for the right tools

── 99277 repos indexed ── | filtered by tag: #commonmark
jgm/pandoc ★ 46417 4937 APPLICATION

Pandoc is a universal document converter written in Haskell. It reads input in dozens of formats (Markdown, LaTeX, HTML, docx, EPUB, Org, RST, MediaWiki, etc.) into a common abstract syntax tree (AST), then writes to a wide range of output formats. The system is modular: readers parse source formats, writers produce target formats, and a template system controls output structure. It includes an integrated citation processor (citeproc), a Lua scripting engine for custom readers/writers/filters, and a server mode (HTTP API). The codebase is a monolith library with separate CLI, server, and Lua engine packages, plus a WebAssembly build for browser use. It is heavily tested with golden tests and property tests. The architecture demonstrates strong separation of concerns, with reusable parsing utilities, a well-defined AST, and a flexible extension mechanism via Lua. While the codebase is large and complex, it is actively maintained and exhibits high craftsmanship in its modular design and handling of diverse formats.

RATING: 9.6/10 MAINT: active DRIFT: low
▸ 6 reusable components found
markedjs/marked ★ 37219 3741 APPLICATION

marked is a high-performance Markdown parser and compiler written in TypeScript, designed for speed and extensibility. It converts Markdown text into HTML, supporting the CommonMark specification and GitHub Flavored Markdown (GFM) extensions such as tables, task lists, strikethrough, and autolinks. The library is used both as a Node.js package (ESM and UMD builds) and as a command-line tool (bin/marked). Its architecture is modular, consisting of a Lexer (tokenization), Parser (AST construction), Renderer (HTML output), and an extension system via Hooks and custom tokenizers. The core entry point is the `marked()` function, which accepts a Markdown string and options, and returns HTML. The library also exposes a `Marked` class for more control, including async parsing, token walking, and plugin integration. marked does not sanitize output HTML, leaving XSS prevention to downstream consumers. The project includes an extensive test suite with over 600 CommonMark spec examples, GFM spec tests, and custom regression/performance tests (including ReDoS mitigation). The CLI supports stdin, file input, and config files, making it suitable for scripting and build pipelines.

RATING: 9.3/10 MAINT: active DRIFT: low
▸ 2 reusable components found
remarkjs/remark ★ 9013 389 APPLICATION

This repository is the remark markdown ecosystem monorepo. It ships four npm packages: remark-parse (markdown to mdast AST), remark-stringify (mdast AST to markdown), remark (a preconfigured unified processor with both), and remark-cli (a terminal interface). In practice, these packages are thin adapter plugins for unified: they attach parser/compiler functions to a unified processor, merge user settings from processor data, and expose extension hooks that other plugins use to add syntax support. The heavy CommonMark parsing and serialization is delegated to mdast-util-from-markdown and mdast-util-to-markdown, so the code here is intentionally small and focused on clean integration rather than reimplementation. The architecture is a workspace-based monorepo of ESM-only packages. Entry points are `remark()`, `unified().use(remarkParse)`, `unified().use(remarkStringify)`, and the `remark` CLI binary. The primary data flow is: markdown text -> unified parse -> mdast tree -> plugin transformations -> unified compile -> markdown text. Extension mechanisms use processor data fields (`micromarkExtensions`, `fromMarkdownExtensions`, `toMarkdownExtensions`), which keeps core packages stable while allowing the plugin ecosystem to grow without coupling. Maintenance is active: CI runs against multiple Node versions, tests downstream packages as canaries, and the codebase enforces strict TypeScript coverage. Technical drift is low: the packages target maintained Node versions, use current unified/micromark-based dependencies, and follow modern ESM conventions. The design is a strong example of building a stable, plugin-driven toolchain around an AST-processing core.

RATING: 9.3/10 MAINT: active DRIFT: low
▸ 4 reusable components found
thephpleague/html-to-markdown ★ 1906 216 APPLICATION

This is a PHP library that converts HTML strings to Markdown. It parses HTML into a DOMDocument, then recursively traverses the DOM tree, converting each node to its Markdown equivalent using a registry of converter classes. The architecture is clean: an `HtmlConverter` orchestrates the process, an `Environment` manages configuration and converter registration, and individual converter classes handle specific HTML elements (headers, links, lists, tables, etc.). The library supports extensive configuration options including stripping tags, preserving comments, customizing emphasis styles, and enabling table conversion. It provides both a programmatic API and a CLI binary. The code is well-structured with strict typing, interfaces, and comprehensive test coverage. It demonstrates solid software engineering practices and is actively maintained.

RATING: 8.9/10 MAINT: active DRIFT: low
▸ 2 reusable components found
yuin/goldmark ★ 4990 309 APPLICATION

Goldmark is a CommonMark-compliant Markdown parser and HTML renderer written in Go, designed for high performance and extensibility. The v2 branch introduces a complete redesign with Go generics, a cleaner separation of parser and renderer, and more semantic AST nodes. The core library exposes a `parser` package with `New()` and `Parse()` to produce an AST, and a `renderer/html` package with `New()` and `Render()` to output HTML. Extensions (tables, footnotes, strikethrough, task lists, typographer, linkify, definition lists) are implemented via a well-defined extension pattern using `parser.Extension` and `html.Extension` interfaces, making it straightforward to add custom syntax. The architecture is a library rather than a standalone application; it has no CLI or server, but is used by many static site generators and other tools. The codebase demonstrates strong engineering practices: extensive test coverage (including CommonMark spec tests and fuzzing), benchmarking against the C reference implementation, and a modular design that abstracts parsing, rendering, and text handling. The v2 version is still maturing, with some breaking changes from v1 that may affect third-party extensions, but the core is robust and well-documented.

RATING: 8.7/10 MAINT: maintained DRIFT: low
▸ 3 reusable components found
drasimwagan/mdv ★ 506 12 APPLICATION

MDV (Markdown Data & Visualization) is a tool that extends CommonMark Markdown with front-matter, fenced code blocks for charts/tables/stats, `:::` container directives for layout and styled regions, and auto-generated table of contents. It parses `.mdv` files and renders them to self-contained HTML with inline SVG charts (bar, line, pie) and CSS themes, requiring no JavaScript runtime in the output. The project is a TypeScript monorepo with three packages: `@mdv/core` (parser and renderer library), `@mdv/cli` (CLI with render, preview, and PDF export commands), and `mdv-vscode` (VS Code extension providing live side-by-side preview). The parser uses `markdown-it` as a base with a fence-aware preprocessor that handles `:::` directives and HTML comments correctly within code blocks. The renderer is designed for robustness: errors never crash the document, invalid front-matter renders a fatal banner, and chart data validation produces inline error messages. Security measures include escaping raw HTML, sanitizing style values, and preventing path traversal in data file references. The CLI supports live preview with file watching and auto-reload, and PDF export via headless Chromium (Puppeteer). The VS Code extension provides a debounced live preview that also refreshes on data file changes.

RATING: 8.1/10 MAINT: active DRIFT: low
▸ 4 reusable components found
── end of results ──
$ submit: