A Markdown NSAttributedString parser.
Switch branches/tags
Nothing to show
Pull request Compare This branch is even with myell0w:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
MarkdownAttributedString.xcodeproj
MarkdownCatalog
fmemopen @ 1d696d3
grammar
nimbus @ 98e18b8
src
.gitignore
.gitmodules
LICENSE
NOTICE
Prefix.pch
README.mdown

README.mdown

A Markdown NSAttributedString Parser

This is a Markdown => NSAttributedString parser built on top of a flex parser. It takes an NSString and returns an NSAttributedString with markdown tags replaced by CoreText formatting attributes.

Adding it to your Project

  1. Drag all of the files from the src/ directory into your project.
  2. Import NSAttributedStringMarkdownParser.h in your project.
  3. Create an instance of the parser object and pass it the string you wish to parse.
  4. Plug the resulting NSAttributedString into your favorite NSAttributedString label implementation.

NSAttributedString Labels

Nimbus: https://github.com/jverkoey/nimbus TTTAttributedLabel: https://github.com/mattt/TTTAttributedLabel

Supported Features

*italics*
**bold**
***bold italic***
~~strike-through~~

# Header 1
## Header 2
### Header 3
#### Header 4
##### Header 5
###### Header 6

Header 1
========

Header 2
--------

> Block Quote
>> Block quote level 2

http://google.com urls
[URLs with description](http://google.com 'and optional tooltip')

Example

NSAttributedStringMarkdownParser* parser = [[NSAttributedStringMarkdownParser alloc] init];
NSAttributedString* string = [parser attributedStringFromMarkdownString:
                              @"This is __rad__.""];

See the Catalog application included with the project for more examples.