Skip to content
프로젝트

소개

An extensive Swift framework providing simple and customizable markdown parsing.

개발 도구

이 수치를 측정하는 방법

What you can do

  • Parse Markdown to styled NSAttributedString
  • Support for bold, italic, strikethrough, headers, lists, ordered lists, task lists, quotes, horizontal rules, code blocks
  • Tables with column alignment (GFM-style)
  • Reference-style links ([text][ref] + [ref]: url definitions)

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

CDMarkdownKit

CI Status Swift Versions Swift Package Manager Compatible License


A pure-Swift, zero-dependency framework for parsing Markdown text into styled NSAttributedString.

Features

  • Parse Markdown to styled NSAttributedString
  • Support for bold, italic, strikethrough, headers, lists, ordered lists, task lists, quotes, horizontal rules, code blocks
  • Tables with column alignment (GFM-style)
  • Reference-style links ([text][ref] + [ref]: url definitions)
  • Clickable links and automatic URL detection
  • Image rendering (iOS, macOS, tvOS, visionOS)
  • Async image loading with async/await
  • Custom Markdown elements
  • CDMarkdownTheme for one-call parser styling
  • Custom attribute keys: .cdMarkdownCodeLanguage, .cdMarkdownLinkTitle
  • UILabel and UITextView subclasses with Markdown support
  • macOS UI components (NSTextView, NSLabel subclasses)
  • SwiftUI support via CDMarkdownText and CDMarkdownView
  • Swift 6 concurrency safety

Quick Example

import CDMarkdownKit

let parser = CDMarkdownParser()
let markdown = "# Hello **World**\n\nThis is *italic* text."
let attributedString = await parser.parse(markdown)
label.attributedText = attributedString

Requirements

Platform Minimum OS Swift Installation
iOS 13.0+ 5.3+ SPM
macOS 10.15+ 5.3+ SPM
tvOS 13.0+ 5.3+ SPM
watchOS 6.0+ 5.3+ SPM
visionOS 1.0+ 5.3+ SPM

Installation

Note: CocoaPods support was removed in v4.2.0 ahead of CocoaPods Trunk going read-only on 2026-12-02. The last version published via CocoaPods was 4.1.0. If you're installing via CocoaPods, switch to Swift Package Manager below — already-installed versions will keep resolving, but the pod will no longer receive updates.

Swift Package Manager

Add to your Package.swift:

.package(url: "https://github.com/chrisdhaan/CDMarkdownKit.git", from: "4.0.0")

Or in Xcode: File → Add Packages and enter the repository URL.

Usage

For comprehensive usage documentation including styling, custom elements, and platform-specific information, see Documentation/Usage.md.

Contributing

We welcome contributions! Before contributing to CDMarkdownKit, please read the detailed instructions in our contribution guide. We maintain high standards for code quality and test coverage, and we're happy to help you get your changes integrated.


License

CDMarkdownKit is available under the MIT license. See the LICENSE file for more info.

관련 프로젝트 살펴보기

불러오는 중…