PerfectMarkdown

3.1.0

A solution to convert markdown text into html presentation in Swift, based on GerHobbelt's "upskirt" project.
PerfectlySoft/Perfect-Markdown

What's New

upgrading to Swift 4.2/5.2

2020-07-07T19:32:02Z

Thanks @wito for the contribution.

Perfect-Markdown 简体中文

Get Involed with Perfect!

Star Perfect On Github Stack Overflow Follow Perfect on Twitter Join the Perfect Slack

Swift 4.1 Platforms OS X | Linux License Apache PerfectlySoft Twitter Slack Status

This project provides a solution to convert markdown text into html presentations.

This package builds with Swift Package Manager and is part of the Perfect project but can also be used as an independent module.

Acknowledgement

Perfect-Markdown is directly building on GerHobbelt's "upskirt" project.

Swift Package Manager

Add dependencies to your Package.swift

.package(url: "https://github.com/PerfectlySoft/Perfect-Markdown.git", 
	from: "3.0.0")

// on target section:
.target(
            // name: "your project name",
            dependencies: ["PerfectMarkdown"]),

Import Perfect Markdown Library

Add the following header to your swift source code:

import PerfectMarkdown

Get HTML from Markdown Text

Once imported, a new String extension markdownToHTML would be available:

let markdown = "# some blah blah blah markdown text \n\n## with mojo 🇨🇳 🇨🇦"

guard let html = markdown.markdownToHTML else {
  // conversion failed
}//end guard

print(html)

Further Information

For more information on the Perfect project, please visit perfect.org.

Description

  • Swift Tools 5.0.0
View More Packages from this Author

Dependencies

  • None
Last updated: Sat Nov 09 2024 04:24:36 GMT-1000 (Hawaii-Aleutian Standard Time)