GitXplorerGitXplorer
m

MMMarkdown

public
1247 stars
170 forks
11 issues

Commits

List of commits on branch master.
Verified
0468be1a395425d54f04a6c93c76e6d6a93663e3

Merge pull request #122 from agilebits/anthony/fix-project-warnings

mmdiep committed 7 years ago
Verified
cde7bd40066c09f4d33b8b265bf8d520705589ce

Fix project warnings

llobianco committed 7 years ago
Verified
394c5243ccd499d0acb9f33e6402e254f5868577

Merge pull request #1 from agilebits/rudy/update-from-upstream

MMrRooni committed 7 years ago
Unverified
fe89b93fe8ef499be19db8d5ce4277462ed32c71

Merge pull request #115 from albertbori/master

mmdiep committed 8 years ago
Unverified
0b859b542c3ad72ce455b69fbf8c9708c1fa3612

#114 Added automatic link recognition test for @ sybmols

aalbertbori committed 8 years ago
Unverified
c9d594dc3da2b7d2dba89fa191e572c81be1ad47

Merge remote-tracking branch 'mdiep/master'

aalbertbori committed 8 years ago

README

The README file for this repository.

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:

  1. Add MMMarkdown as a git submodule. (git submodule add https://github.com/mdiep/MMMarkdown <path>)

  2. Add MMMarkdown.xcodeproj to your project or workspace

  3. Add MMMarkdown.framework to the ”Link Binary with Libraries" section of your project's “Build Phases”.

  4. Add MMMarkdown.framework to a ”Copy Files” build phase that copies it to the Frameworks destination.

License

MMMarkdown is available under the MIT License.