Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mdiep/MMMarkdown
An Objective-C framework for converting Markdown to HTML.
https://github.com/mdiep/MMMarkdown
ios markdown objective-c
Last synced: 3 months ago
JSON representation
An Objective-C framework for converting Markdown to HTML.
- Host: GitHub
- URL: https://github.com/mdiep/MMMarkdown
- Owner: mdiep
- License: mit
- Created: 2012-03-16T01:10:20.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2020-10-24T12:08:20.000Z (about 4 years ago)
- Last Synced: 2024-04-04T09:01:37.532Z (7 months ago)
- Topics: ios, markdown, objective-c
- Language: Objective-C
- Homepage:
- Size: 1.93 MB
- Stars: 1,245
- Watchers: 33
- Forks: 167
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-ios-star - MMMarkdown - An Objective-C static library for converting Markdown to HTML. (Text / Other Testing)
- awesome-ios - MMMarkdown - An Objective-C static library for converting Markdown to HTML. (Text / Other Testing)
README
# 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.
[Markdown]: http://daringfireball.net/projects/markdown/
## API
Using MMMarkdown is simple. The main API is a single class method:#import
NSError *error;
NSString *markdown = @"# Example\nWhat a library!";
NSString *htmlString = [MMMarkdown HTMLStringWithMarkdown:markdown error:&error];
// Returns @"Example
\nWhat a library!
"The markdown string that is passed in must be non-nil.
MMMarkdown also supports a number of Markdown extensions:
#import
NSString *markdown = @"~~Mistaken~~";
NSString *htmlString = [MMMarkdown HTMLStringWithMarkdown:markdown extensions:MMMarkdownExtensionsGitHubFlavored error:NULL];
// Returns @""
Mistaken## Setup
Adding MMMarkdown to your project is easy.If you’d like to use [Carthage](https://github.com/Carthage/Carthage), add the following line to your `Cartfile`:
```
github "mdiep/MMMarkdown"
```Otherwise, you can:
0. Add MMMarkdown as a git submodule. (`git submodule add https://github.com/mdiep/MMMarkdown `)
0. Add `MMMarkdown.xcodeproj` to your project or workspace
0. Add `MMMarkdown.framework` to the ”Link Binary with Libraries" section of your project's “Build Phases”.
0. Add `MMMarkdown.framework` to a ”Copy Files” build phase that copies it to the `Frameworks` destination.
## License
MMMarkdown is available under the [MIT License][].[MIT License]: http://opensource.org/licenses/mit-license.php