# swiftlang/swift-markdown

A Swift package for parsing, building, editing, and analyzing Markdown documents.

Repository: https://github.com/swiftlang/swift-markdown
Canonical: https://ross.abutalabs.com/products/swift-markdown
Homepage: https://swiftpackageindex.com/swiftlang/swift-markdown/documentation/markdown
Language: Swift
License: Apache-2.0
License Family: permissive
Last push: 2026-08-25T07:37:17+00:00

## Health v2 (maintenance only)
Score: 89/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 71, longevity 100
- inputs: {"age_days": 1871, "days_push": 8, "days_rel": 118, "gap_med": 52, "n_releases_24m": 8}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3403, forks 295 (observed 2026-08-28T04:08:02.979108+00:00)

## What it is
A Swift package for parsing, building, editing, and analyzing Markdown documents, backed by GitHub-flavored Markdown's cmark-gfm implementation. It exposes an immutable, thread-safe, copy-on-write markup tree similar in design to SwiftSyntax.

## Use cases
- parse markdown into a structured syntax tree in swift
- programmatically edit or transform markdown documents
- analyze markdown document structure
- build markdown documents from code
- work with github-flavored markdown in a swift app

## When to choose
- you need a spec-compliant GFM parser in Swift
- you want a typed, immutable syntax tree for markdown manipulation
- you're building Swift tooling like documentation generators or linters

## When to avoid
- you need markdown rendering to HTML out of the box with no tree manipulation
- your project is not in the Swift ecosystem
- you need CommonMark extensions beyond the supported dialect

## Facets
- artifact type: library
- maturity: stable
- function: parser, markdown, developer-tools
- domain: parsers, documentation, developer-tools
- platform: cross-platform, cli
- tags: markdown-parser, cmark-gfm, swift-package-manager, syntax-tree, document-editing, swift

## Member repositories
- swiftlang/swift-markdown (main) score 89

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:02.979108+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:38:38.295846+00:00, confidence not recorded.
  - readme: https://github.com/swiftlang/swift-markdown (fetched 2026-08-28T04:08:02.979108+00:00, sha 321c748e3f53)
- Data as of 2026-08-30T08:39:29.467469+00:00.
