Latest 0.5.5
Homepage https://github.com/mdiep/MMMarkdown
License MIT Copyright (C) 2012-2013 Matt Diephouse.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Platforms ios 8.0, osx 10.6, tvos 9.0, watchos 2.0, requires ARC
Authors

MMMarkdown is an Objective-C framework for converting Markdown to HTML. It is compatible with OS X 10.6+, 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   = @"# ExamplenWhat 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.

Latest podspec

{
    "name": "MMMarkdown",
    "version": "0.5.5",
    "summary": "An Objective-C static library for converting Markdown to HTML.",
    "homepage": "https://github.com/mdiep/MMMarkdown",
    "license": {
        "type": "MIT",
        "text": "  t        Copyright (C) 2012-2013 Matt Diephouse.nnttPermission is hereby granted, free of charge, to any person obtaining a copynttof this software and associated documentation files (the "Software"), to dealnttin the Software without restriction, including without limitation the rightsnttto use, copy, modify, merge, publish, distribute, sublicense, and/or sellnttcopies of the Software, and to permit persons to whom the Software isnttfurnished to do so, subject to the following conditions:nnttThe above copyright notice and this permission notice shall be included innttall copies or substantial portions of the Software.n nttTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORnttIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,nttFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEnttAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERnttLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,nttOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS INnttTHE SOFTWARE.n"
    },
    "authors": {
        "Matt Diephouse": "[email protected]"
    },
    "source": {
        "git": "https://github.com/mdiep/MMMarkdown.git",
        "tag": "0.5.5"
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.6",
        "tvos": "9.0",
        "watchos": "2.0"
    },
    "source_files": "Source/**/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This