OCDiscount 0.2.0

OCDiscount 0.2.0

LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2015

Maintained by Unclaimed.

  • By
  • Sumardi Shukor

Discount Markdown Processor for iOS and OS X

Overview Build Status

Discount is an implementation of John Gruber's Markdown markup language in C. It implements all of the language described in the markdown syntax document and passes the Markdown 1.0 test suite.

Discount was developed by David Loren Parsons. OCDiscount is created and maintained by Sumardi Shukor.


OCDiscount requires Xcode 5, targeting either iOS 6.0 and above, or Mac OS 10.8 Mountain Lion (64-bit with modern Cocoa runtime) and above.

The libdiscount.a static library must be linked into the application target for proper compilation. The steps are:

  1. In the project editor, select the target to which you want to add the library
  2. Click Build Phases at the top of the project editor.
  3. Open the Link Binary With Libraries section.
  4. Click the Add button (+) to add libdiscount.a library.

Ignore these steps if you are using CocoaPods.


CocoaPods is the recommended way to add OCDiscount to your project.

Here's an example podfile that installs OCDiscount.


platform :osx, '10.8'
pod 'OCDiscount', '~> 0.1.0'

Then run pod install.


Depending on how you configure your project you may need to #import either <OCDiscount/OCDiscount.h> or "OCDiscount.h".

NSString *test = @"*Hello* from **markdown**!";

NSLog(@"%@", [markdown htmlStringFromMarkdown]);


Bugs and feature request are tracked on Github.



Discount is free software; it is released under a BSD-style license that allows you to do as you wish with it as long as you don't attempt to claim it as your own work. OCDiscount is available under the MIT license. See the LICENSE file for more info.