turndown-plugin-gfm
A Turndown plugin that adds GitHub Flavored Markdown extensions to HTML-to-Markdown conversion.
Repository Health
Technical Analysis
turndown-plugin-gfm is a companion plugin for the Turndown HTML-to-Markdown converter that adds the GitHub Flavored Markdown (GFM) rules Turndown’s core doesn’t cover out of the box: strikethrough, tables, and task list items. Each rule is exposed both individually and bundled as a single gfm plugin, so consumers can apply only the extensions they need.
What You Get
- A gfm export that bundles all GFM rules into Turndown with a single turndownService.use(gfm) call
- Individually importable strikethrough, tables, and taskListItems plugins for selective use
- Table conversion that respects column alignment (left/right/center) and only converts tables with a heading row
- Prebuilt CJS, ESM, and browser IIFE bundles alongside the source
Common Use Cases
- Converting GitHub README or wiki HTML back into GFM-flavored Markdown
- Building a markdown-export feature for a rich text or WYSIWYG editor that needs GitHub-style tables and task lists
- Round-tripping HTML content from CMS or scraped pages into Markdown that renders correctly on GitHub
Under The Hood
Architecture: The library is organized as independent Turndown rule modules (strikethrough.js, tables.js, task-list-items.js, highlighted-code-block.js) each exporting a function that calls turndownService.addRule() with a filter and replacement, unified by gfm.js which imports and applies all four via turndownService.use([…]); the tables module additionally maintains its own internal rules object and helper functions (cell, isHeadingRow) to handle GFM table alignment syntax. Tech Stack: Written in plain ES module JavaScript, built with Rollup into CJS/ES/IIFE bundles via config/rollup.config.*.js, tested with a custom turndown-attendant harness and linted with the standard style guide; its only real dependency is the peer Turndown library it plugs into. Code Quality: The test suite (test/turndown-plugin-gfm-test.js) exercises the built bundle rather than source directly and is thin relative to the rule surface (no per-branch alignment/edge-case coverage visible beyond the attendant fixtures); code favors small, single-purpose functions per rule with no classes or heavy abstraction. API Design: The API is minimal and composable, one call to turndownService.use(gfm) or use([tables]) for a-la-carte rule selection, requiring no configuration objects or setup beyond passing rules into an existing TurndownService instance.
Used by 6 apps in this directory
AionUi
AI Agents · Productivity
Free, open-source Cowork desktop app that unifies Claude Code, Codex, Gemini CLI, and 20+ AI agents into a single platform with multi-agent teams, 24/7 cron automation, and zero-config built-in agent.
Cherry Studio
AI Assistants
All-in-one AI desktop client with 300+ assistants and multi-model support
cmux
Developer Tools · AI Development
A native, Ghostty-based macOS terminal with vertical tabs, agent-aware notifications, and a scriptable browser built for running many parallel AI coding agent sessions instead of juggling tmux panes.
Kaneo
Product Management · Productivity · Project Management
Lightweight self-hosted project management that gives you kanban boards, GitHub sync, and full team collaboration without the enterprise bloat.
Open WebUI
AI Assistants · AI Agents
The extensible, privacy-first AI platform that runs Ollama, OpenAI, and any LLM backend behind a polished, feature-packed web interface.
Suna
AI Agents
Turn your company into a git repo — one config, one command center, a workforce of AI agents that runs the real work around the clock.