Skip to content

Commit 0562dd7

Browse files
authored
docs(renderer): remove link to oudated line (#312)
incorrect after marked v15 update #305
1 parent 4a57485 commit 0562dd7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ For example, to override how heading like `# heading text` is rendered:
175175

176176
```js
177177
hexo.extend.filter.register('marked:renderer', function(renderer) {
178-
const { config } = this; // Skip this line if you don't need user config from _config.yml
178+
const { config } = this; // Optional if you don't need user config from _config.yml
179179
renderer.heading = function({ tokens, depth: level }) {
180180
const text = this.parser.parseInline(tokens);
181181
// Default behaviour
@@ -191,7 +191,7 @@ hexo.extend.filter.register('marked:renderer', function(renderer) {
191191

192192
Save the file in "scripts/" folder and run Hexo as usual.
193193

194-
Notice `renderer.heading = function (text, level) {` corresponds to [this line](https://github.com/hexojs/hexo-renderer-marked/blob/a93ebeb1e8cc11e754630c0a1506da9a1489b2b0/lib/renderer.js#L21). Refer to [renderer.js](https://github.com/hexojs/hexo-renderer-marked/blob/master/lib/renderer.js) on how this plugin overrides the default methods. For other methods not covered by this plugin, refer to marked's [documentation](https://marked.js.org/using_pro#renderer).
194+
Refer to [renderer.js](https://github.com/hexojs/hexo-renderer-marked/blob/master/lib/renderer.js) on how this plugin overrides the default methods. For other methods not covered by this plugin, refer to marked's [documentation](https://marked.js.org/using_pro#renderer).
195195

196196
#### Tokenizer
197197

0 commit comments

Comments
 (0)