Skip to content

Commit

Permalink
docs: update readme with base plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesKaufmann committed Nov 4, 2024
1 parent 90318d6 commit 1947a7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import (
"log"

"github.com/JohannesKaufmann/html-to-markdown/v2/converter"
"github.com/JohannesKaufmann/html-to-markdown/v2/plugin/base"
"github.com/JohannesKaufmann/html-to-markdown/v2/plugin/commonmark"
)

Expand All @@ -71,6 +72,7 @@ func main() {

conv := converter.NewConverter(
converter.WithPlugins(
base.NewBasePlugin(),
commonmark.NewCommonmarkPlugin(
commonmark.WithStrongDelimiter("__"),
// ...additional configurations for the plugin
Expand All @@ -90,7 +92,7 @@ func main() {
- 🧑‍💻 [Example code, options](/examples/options/main.go)

> [!NOTE]
> If you use `NewConverter` directly make sure to also **register the commonmark plugin**.
> If you use `NewConverter` directly make sure to also **register the commonmark and base plugin**.
### Plugins

Expand Down
2 changes: 2 additions & 0 deletions examples/options/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"log"

"github.com/JohannesKaufmann/html-to-markdown/v2/converter"
"github.com/JohannesKaufmann/html-to-markdown/v2/plugin/base"
"github.com/JohannesKaufmann/html-to-markdown/v2/plugin/commonmark"
)

Expand All @@ -13,6 +14,7 @@ func main() {

conv := converter.NewConverter(
converter.WithPlugins(
base.NewBasePlugin(),
commonmark.NewCommonmarkPlugin(
commonmark.WithStrongDelimiter("__"),
// ...additional configurations for the plugin
Expand Down

0 comments on commit 1947a7f

Please sign in to comment.