diff --git a/README.md b/README.md index 88327bf..24d6e05 100644 --- a/README.md +++ b/README.md @@ -58,4 +58,76 @@ options.getSafelist().removeProtocols("img", "src", "http", "https"); String html2 = Marked.marked("![alt text](/img/some-image.png \"title\")", options); // =>
+``` + +## Extensions + +Markedj can be extended by implementing [custom extensions](https://github.com/gitbucket/markedj/blob/master/src/main/java/io/github/gitbucket/markedj/extension/Extension.java). +Extensions can be used by adding them to the options. + +```java +Options options = new Options(); +options.addExtension(new NotificationExtension()); +String html = Marked.marked("! This is an info message", options); + // =>This is an info message
This is an info message
+This is a success message
+This is a warning message
+This is an error message
+This is an info message +That spans over several lines
+