Skip to content

Commit 88d0111

Browse files
Update README.md
1 parent c3c2a08 commit 88d0111

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,17 @@ This package allows you to quicly convert HTML code into Markdown. Normally you
44
## Supported Flavors of HTML
55
| Flavor | Support |
66
| -------------------- | --------------------------------------------------- |
7-
| Mastodon Status HTML ||
8-
| Basic HTML | ⚠️ (Almost fully supported, tables are not) |
7+
| Mastodon Status HTML (MastodonHTML) ||
8+
| Basic HTML (BasicHTML) | ⚠️ (Almost fully supported, tables are not) |
9+
10+
## How to use
11+
Using the library is pretty simple. The first step is to pick which HTML flavor you are going to be converting. If you are converting a Basic HTML document you can use the `BasicHTML` class. For Mastodon statuses you can use the `MastodonHTML` class.
12+
13+
Once you have picked out the class you will be using, the following code is all you need!
14+
```swift
15+
var document = BasicHTML(rawHTML: raw)
16+
try document.parse()
17+
18+
let markdown = try document.asMarkdown()
19+
print(markdwon)
20+
```

0 commit comments

Comments
 (0)