You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+61-28Lines changed: 61 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,62 +2,47 @@
2
2
3
3
A robust html-to-markdown converter that transforms HTML (even entire websites) into clean, readable Markdown. It supports complex formatting, customizable options, and plugins for full control over the conversion process.
4
4
5
-
Use the fully extendable [Golang library](#golang-library) or a quick [CLI command](#cli---using-it-on-the-command-line). Try the [demo](https://html-to-markdown.com/demo) to see it in action!
5
+
Use the fully extendable [Golang library](#golang-library) or a quick [CLI command](#cli---using-it-on-the-command-line). Alternatively, try the [Online Demo](https://html-to-markdown.com/demo) or [REST API](https://html-to-markdown.com/api) to see it in action!
6
6
7
7
Here are some _cool features_:
8
8
9
9
-**Bold & Italic:** Supports bold and italic—even within single words.
10
10
11
-

11
+

12
12
13
13
-**List:** Handles ordered and unordered lists with full nesting support.
14
14
15
-

15
+

16
16
17
17
-**Blockquote:** Blockquotes can include other elements, with seamless support for nested quotes.
-**Link & Image:** Properly formats multi-line links, adding escapes for blank lines where needed.
26
26
27
-

27
+

28
28
29
29
-**Smart Escaping:** Escapes special characters only when necessary, to avoid accidental Markdown rendering.
30
30
🗒️ [ESCAPING.md](/ESCAPING.md)
31
31
32
-

32
+

33
33
34
34
-**Remove/Keep HTML:** Choose to strip or retain specific HTML tags for ultimate control over output.
35
35
36
-

36
+

37
37
38
38
-**Plugins:** Easily extend with plugins. Or create custom ones to enhance functionality.
39
39
40
-

40
+

41
41
42
42
---
43
43
44
44
---
45
45
46
-
> [!WARNING]
47
-
> This is an **early experimental version** of the library.
48
-
>
49
-
> We encourage testing and bug reporting. However, please note:
50
-
>
51
-
> - Not production-ready
52
-
> - Default options are well-tested, but custom configurations have limited coverage
53
-
> - Functionality is currently restricted
54
-
> - Focus is on stabilization and core features
55
-
> - No compatibility guarantee
56
-
> - Only use `htmltomarkdown.ConvertString()` and `htmltomarkdown.ConvertNode()` from the root package. They are _unlikely_ to change.
57
-
> - Other functions and nested packages are _very like_ to change.
58
-
59
-
---
60
-
61
46
## Golang Library
62
47
63
48
### Installation
@@ -68,6 +53,9 @@ go get -u github.com/JohannesKaufmann/html-to-markdown/v2
68
53
69
54
_Or if you want a specific commit add the suffix `/v2@commithash`_
70
55
56
+
> [!NOTE]
57
+
> This is the documentation for the v2 library. For the old version switch to the ["v1" branch](https://github.com/JohannesKaufmann/html-to-markdown/tree/v1).
The function `htmltomarkdown.ConvertString()` is just a small wrapper around `converter.NewConverter()` and `commonmark.NewCommonmarkPlugin()`. If you want more control, use the following:
87
+
The function `htmltomarkdown.ConvertString()` is a _small wrapper_ around `converter.NewConverter()` and the _base_ and _commonmark_ plugins. If you want more control, use the following:
100
88
101
89
```go
102
90
package main
@@ -139,7 +127,48 @@ func main() {
139
127
140
128
### Plugins
141
129
142
-
TODO: info about plugins
130
+
#### Published Plugins
131
+
132
+
These are the plugins located in the [plugin folder](/plugin):
0 commit comments