mdiep/MMMarkdown
关于
用于将 Markdown 转换为 HTML 的 Objective-C 框架。
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- -2
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文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 workspaceAdd
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.
探索相关项目
加载中…