{"id":17095702,"url":"https://github.com/chojnac/dumpling","last_synced_at":"2026-06-01T03:30:14.888Z","repository":{"id":44532048,"uuid":"348849136","full_name":"chojnac/Dumpling","owner":"chojnac","description":"Customisable and extensible Markdown parser written in Swift","archived":false,"fork":false,"pushed_at":"2022-02-09T17:32:07.000Z","size":6948,"stargazers_count":43,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-18T08:51:57.632Z","etag":null,"topics":["customizable","markdown","parser","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chojnac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-17T20:53:28.000Z","updated_at":"2025-02-09T10:29:10.000Z","dependencies_parsed_at":"2022-08-20T07:51:15.579Z","dependency_job_id":null,"html_url":"https://github.com/chojnac/Dumpling","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chojnac%2FDumpling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chojnac%2FDumpling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chojnac%2FDumpling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chojnac%2FDumpling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chojnac","download_url":"https://codeload.github.com/chojnac/Dumpling/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239993963,"owners_count":19730779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["customizable","markdown","parser","swift"],"created_at":"2024-10-14T14:43:34.845Z","updated_at":"2026-06-01T03:30:14.803Z","avatar_url":"https://github.com/chojnac.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dumpling\n\n[![Build Status](https://github.com/chojnac/Dumpling/actions/workflows/ci-mac.yaml/badge.svg?branch=main)](https://github.com/chojnac/Dumpling/actions/workflows/ci-mac.yaml)\n[![Version](https://img.shields.io/cocoapods/v/Dumpling.svg?style=flat)](https://cocoapods.org/pods/Dumpling)\n[![License](https://img.shields.io/cocoapods/l/Dumpling.svg?style=flat)](https://cocoapods.org/pods/Dumpling)\n[![Platform](https://img.shields.io/cocoapods/p/Dumpling.svg?style=flat)](https://cocoapods.org/pods/Dumpling)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\n**Dumpling** is a pure Swift customisable and extensible Markdown parser for iOS, macOS and Linux.  \n\n## Features\n\n- 100% Swift\n- Easy to extend with new markdown tags, output formats or customise existing implementations.\n- Intermediate layer describing document structure with Abstract Syntax Tree\n- Build-in support for rendering outputs as the Plain Text, HTML, NSAttributedString.\n- Multiplatform - iOS, macOS, Linux.\n\n## Internal architecture\n\nDumpling uses a highly extensible and modular functional approach called parser combinator.\n\nMarkdown parser produces an intermediate data model called Abstract Syntax Tree (AST).\n\nRenderer implementations use AST to produce the final output. Dumpling provides 3 main build-in output formats - Plain Text, HTML and NSAttributedString.\n\n## Supported Elements\n\n````\n*italic* or _italics_ \n**bold** or __bold__ \n~~strikethrough~~ \n\n# Header 1\n## Header 2\n### Header 3\n#### Header 4\n##### Header 5\n###### Header 6\n\nHorizontal lines (Thematic breaks)\n\n***\n---\n___\n* * *   *\n-----------------\n\n\n* List\n  - List\n+ List\n\n1. Ordered \n1. Lists with **style**\n\nInline `code` or \n``` \nblock code\n```\n[Links](http://github.com/chojnac/)\n\n\u003e Blockquotes\n\u003e \u003e and  nested blockquote.\n\u003e\n\u003e ## With nested content \n\u003e 1.   This is the **first** list ~~item~~.\n\u003e 2.   This is the *second* list item.\n````\n\nPlease note that the goal of this project was to create a foundation for a  flexible Markdown parser. Dumpling doesn't fully support all Markdown specs. This is a very young implementation so it covers only the most common set of Markdown features. \n\n## Installation\n\n### CocoaPods\n\n```ruby\npod 'Dumpling'\n```\n### Carthage\n\n```\ngithub \"chojnac/Dumpling.git\" ~\u003e 0.3.0\n```\n\n### Swift Package Manager\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/chojnac/Dumpling.git\", .upToNextMajor(from: \"0.3.0\"))\n]\n```\n\n\n## Usage\n\n### Basic usage\nParse text and produce html:\n\n```swift\nimport Dumpling \n\nlet text = \"**Lorem ipsum**\"\nlet html = Markdown().parse(text).renderHTML()\n```\n\nor NSAttributedText:\n\n```swift\nimport Dumpling \n\nlet text = \"**Lorem ipsum**\"\nlet string = Markdown().parse(text).renderAttributedString()\n```\n\n### Change NSAttributedText style\n\n```swift\nimport Dumpling \n\nlet theme = AttributedStringTheme(\n   baseFont: .systemFont(ofSize: 13),\n   color: .blue\n)\n\ntheme.addStyle(\n    forKey: .strong,\n    style: StringStyle.foregroundColor(Color.red)\n)\n\ntheme.addStyle(\n    forKey: .em,\n    style: compose(\n        StringStyle.foregroundColor(Color.green),\n        StringStyle.traits([.italic])\n    )\n)\n\nlet string = Markdown()\n        .parse(text)\n        .renderAttributedString(theme: theme)\n```\n\nYou will find more advanced examples in the [project example playground](https://github.com/chojnac/Dumpling/tree/main/Examples/Playground.playground)\n\n## License\n\nDumpling is available under the MIT license. See the [LICENSE](https://github.com/chojnac/Dumpling/blob/master/LICENSE) file for more info.\n\nMarkdown test document used in the project based on [Max Stoiber's Markdown Test File](https://github.com/mxstbr/markdown-test-file)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchojnac%2Fdumpling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchojnac%2Fdumpling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchojnac%2Fdumpling/lists"}