I\'m writing a Cocoa application in Objective-C, and I would like to be able to incorporate Markdown. The user will enter text in Markdown syntax, click an \"export\" button
I found problems with processing large amounts of markdown with these C-based libraries.
There's a very simple Obj-C library that worked for me here:
https://github.com/mdiep/MMMarkdown
Steps to use MMMarkdown:
Build the OS X or iOS target
Copy include/MMMarkdown.h
and either
lib/libMMMarkdown-Mac.a
or lib/libMMMarkdown-iOS.a
into your project
Then the code is:
#import "MMMarkdown.h"
NSError *error;
NSString *markdown = @"# Example\nWhat a library!";
NSString *htmlString = [MMMarkdown HTMLStringWithMarkdown:markdown error:&error];
// Returns @"Example
\nWhat a library!
"