finds.dev← search

// the find

JohnSundell/Ink

★ 2,524 · Swift · MIT · updated Mar 2024

A fast and flexible Markdown parser written in Swift.

Ink is a Markdown-to-HTML parser written in Swift, built by John Sundell for his Publish static site generator and used to run swiftbysundell.com. It targets Swift developers building static site tools or apps that need Markdown rendering without pulling in a C dependency like cmark.

The modifier system is genuinely useful — you get both the rendered HTML and the raw Markdown for each fragment, so post-processing is straightforward without forking the parser. Memory usage is handled carefully via string indexes and substrings rather than copying, which matters when processing hundreds of articles. The internal architecture is clean: each fragment type is self-contained, making it easy to trace how a specific construct gets parsed. Ships with a CLI tool that works via stdin, file arg, or flag, which is handy for build scripts.

No CommonMark compliance, and the README says so upfront — but that's a real limitation if you're working with content authored in tools that rely on spec-defined edge cases (nested emphasis, link disambiguation, etc.). Last meaningful activity was early 2024 and it still targets Swift 5.2 in its badges, which suggests it's in maintenance mode at best. No support for footnotes, definition lists, or task lists, which are standard in GitHub Flavored Markdown. If you need those, you're writing your own modifiers or switching parsers.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →