Swiftpack.co -  Snowy1803/PulsrMarkdown as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Snowy1803/PulsrMarkdown
A simple markdown parser, with support for ||spoilers|| (or >!spoilers!<)
.package(url: "https://github.com/Snowy1803/PulsrMarkdown.git", from: "v0.1")

PulsrMarkdown

Provides a markdown to NSAttributedString lightweight converter. Requires UIKit, and works on iOS 13+, Mac Catalyst 13+ and watchOS 6+.

It also provides UIViews to show and edit markdown on iOS (with special support for spoilers).

Supports:

  • bold, italic, underline, strikethrough, spoilers, code (inline)
  • blockquotes, header titles, code (blocks)

Get started

If you want to use it with UIKit, import PulsrMarkdownViews and use MarkdownEditorView(generator:) to make an editable markdown text view, and MarkdownRenderedTextView(generator:) to show the result. You pass a generator, which include the set of MarkdownRule to apply (replacements and markdown attributes).

If you only need the UIKit-compatible NSAttributedString and want to implement the view yourself (or on watchOS), use MarkdownGenerator.generate(string:) (or MarkdownGenerator.generate(string:tappedIds) if you need spoiler support)

GitHub

link
Stars: 1
Last commit: 4 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

0.1
4 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API