MMMarkdown
An Objective-C framework for converting Markdown to HTML.
Install / Use
/learn @mdiep/MMMarkdownREADME
MMMarkdown
MMMarkdown is an Objective-C framework for converting Markdown to HTML. It is compatible with OS X 10.7+, iOS 8.0+, tvOS, and watchOS.
Unlike other Markdown libraries, MMMarkdown implements an actual parser. It is not a port of the original Perl implementation and does not use regular expressions to transform the input into HTML. MMMarkdown tries to be efficient and minimize memory usage.
API
Using MMMarkdown is simple. The main API is a single class method:
#import <MMMarkdown/MMMarkdown.h>
NSError *error;
NSString *markdown = @"# Example\nWhat a library!";
NSString *htmlString = [MMMarkdown HTMLStringWithMarkdown:markdown error:&error];
// Returns @"<h1>Example</h1>\n<p>What a library!</p>"
The markdown string that is passed in must be non-nil.
MMMarkdown also supports a number of Markdown extensions:
#import <MMMarkdown/MMMarkdown.h>
NSString *markdown = @"~~Mistaken~~";
NSString *htmlString = [MMMarkdown HTMLStringWithMarkdown:markdown extensions:MMMarkdownExtensionsGitHubFlavored error:NULL];
// Returns @"<p><del>Mistaken</del></p>"
Setup
Adding MMMarkdown to your project is easy.
If you’d like to use Carthage, add the following line to your Cartfile:
github "mdiep/MMMarkdown"
Otherwise, you can:
-
Add MMMarkdown as a git submodule. (
git submodule add https://github.com/mdiep/MMMarkdown <path>) -
Add
MMMarkdown.xcodeprojto your project or workspace -
Add
MMMarkdown.frameworkto the ”Link Binary with Libraries" section of your project's “Build Phases”. -
Add
MMMarkdown.frameworkto a ”Copy Files” build phase that copies it to theFrameworksdestination.
License
MMMarkdown is available under the MIT License.
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
