Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ActuallyTaylor authored Aug 23, 2023
1 parent c3c2a08 commit 88d0111
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,17 @@ This package allows you to quicly convert HTML code into Markdown. Normally you
## Supported Flavors of HTML
| Flavor | Support |
| -------------------- | --------------------------------------------------- |
| Mastodon Status HTML ||
| Basic HTML | ⚠️ (Almost fully supported, tables are not) |
| Mastodon Status HTML (MastodonHTML) ||
| Basic HTML (BasicHTML) | ⚠️ (Almost fully supported, tables are not) |

## How to use
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.

Once you have picked out the class you will be using, the following code is all you need!
```swift
var document = BasicHTML(rawHTML: raw)
try document.parse()

let markdown = try document.asMarkdown()
print(markdwon)
```

0 comments on commit 88d0111

Please sign in to comment.