Skip to content

Commit 6151009

Browse files
committed
readme
1 parent 3c644c3 commit 6151009

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
# MarkNote Parser
1+
# MarkNote Parser
22

3-
A dead simple markdown parser implemented in Swift with performance in mind, which can help you to transform markdown code into HTML.
3+
4+
Objective-C version: https://github.com/marknote/MarkNoteParserObjC
5+
Swift version: https://github.com/marknote/MarknoteParser
6+
7+
8+
A dead simple markdown parser implemented in both **Swift** and **Objective-C** with performance in mind, which can help you to transform markdown code into HTML.
49
Most of markdown parsers highly depend on regular expression while MarkNote Parser avoids doing so.
510

611
## Purpose
@@ -11,6 +16,7 @@ After trying to find a relevant markdown parser in Swfit/Object-c while no luck,
1116

1217
## Usage
1318

19+
### Using swift version
1420
- Cope 2 files into your project:
1521
-- **StringExtensions.swift** , extension of String class;
1622
-- **MarkNoteParser.swift**, the parser class;
@@ -24,6 +30,18 @@ func markdown(input :String)->String{
2430
return result
2531
}
2632
```
33+
### Using objetive-c version
34+
- Cope all files under "MarkNoteParserOC" folder into your project, and import the header file like this
35+
36+
```objective-c
37+
#import "MarkNoteParser.h"
38+
```
39+
- Then you can call MarkNoteParser to parse your markdown document:
40+
41+
```objective-c
42+
NSString* result = [MarkNoteParser toHtml:input];
43+
return result;
44+
```
2745
2846
## Features
2947

0 commit comments

Comments
 (0)