diff --git a/README.md b/README.md
index 4a1b6d4..880f380 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# hexo-renderer-marked
-[](https://github.com/hexojs/hexo-renderer-marked/actions?query=workflow%3ATester)
+[](https://github.com/hexojs/hexo-renderer-marked/actions/workflows/tester.yml)
[](https://www.npmjs.com/package/hexo-renderer-marked)
[](https://coveralls.io/r/hexojs/hexo-renderer-marked?branch=master)
[](https://libraries.io/npm/hexo-renderer-marked)
@@ -20,7 +20,7 @@ There are two solutions to avoid those issues:
## Installation
-``` bash
+```bash
$ npm install hexo-renderer-marked --save
```
@@ -32,7 +32,7 @@ $ npm install hexo-renderer-marked --save
You can configure this plugin in `_config.yml`.
-``` yaml
+```yml
marked:
gfm: true
pedantic: false
@@ -83,7 +83,7 @@ marked:
- **figcaption** - Append `figcaption` element after each image.
- **prependRoot** - Prepend root value to (internal) image path.
* Example `_config.yml`:
- ``` yml
+ ```yml
root: /blog/
```
* `` becomes ``
@@ -112,7 +112,7 @@ For more options, see [Marked](https://marked.js.org/using_advanced#options). Du
To enable it, pass an object containing the DOMPurify options:
-```json
+```yml
dompurify: true
```
@@ -173,10 +173,11 @@ This plugin overrides some default behaviours of how [marked] plugin renders the
For example, to override how heading like `# heading text` is rendered:
-``` js
+```js
hexo.extend.filter.register('marked:renderer', function(renderer) {
const { config } = this; // Skip this line if you don't need user config from _config.yml
- renderer.heading = function(text, level) {
+ renderer.heading = function({ tokens, depth: level }) {
+ const text = this.parser.parseInline(tokens);
// Default behaviour
// return `