# SimonFairbairn/SwiftyMarkdown

Converts Markdown files and strings into NSAttributedStrings with lots of customisation options.

Repository: https://github.com/SimonFairbairn/SwiftyMarkdown
Canonical: https://ross.abutalabs.com/products/swiftymarkdown
Language: Swift
License: MIT
License Family: permissive
Topics: character-styles, formatting, markdown, markdown-converter
Last push: 2024-08-07T04:55:05+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3833, "days_push": 756, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1741, forks 290 (observed 2026-08-28T04:05:30.298677+00:00)

## What it is
A Swift library that converts Markdown files and strings into NSAttributedStrings with extensive customization options. It supports Apple platforms with dynamic type, Dark Mode, and a rules-based tokenisation engine for headings, lists, links, images, code blocks, and blockquotes.

## Use cases
- render markdown text in a UILabel or UITextView
- convert markdown strings to attributed strings in an iOS app
- display markdown files bundled with an app
- customize fonts and styles for markdown rendering on Apple platforms
- support dark mode when showing markdown content
- parse markdown with lists, blockquotes, and code blocks in Swift

## When to choose
- you need to render Markdown natively in iOS, macOS, tvOS, or watchOS apps
- you want NSAttributedString output for UIKit or AppKit text controls
- you need Dynamic Type and Dark Mode support out of the box
- you want a pure Swift, lightweight Markdown-to-attributed-string converter

## When to avoid
- you need full CommonMark compliance or complex Markdown extensions like tables or footnotes
- you are targeting non-Apple platforms
- you need HTML or cross-platform rendering like WebKit-based views
- you need to convert Markdown to formats other than attributed strings

## Facets
- artifact type: library
- maturity: stable
- function: markdown, parser, serialization
- domain: text-editors, developer-tools, mobile-development, cross-platform
- platform: -
- tags: nsattributedstring, apple-platforms, dynamic-type, dark-mode, uikit, swift, ios, macos, mobile, desktop

## Member repositories
- SimonFairbairn/SwiftyMarkdown (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:30.298677+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-30T03:30:01.698076+00:00, confidence not recorded.
  - readme: https://github.com/SimonFairbairn/SwiftyMarkdown (fetched 2026-08-28T04:05:30.298677+00:00, sha 5f386aa16259)
- Data as of 2026-08-30T08:39:29.467469+00:00.
