mirror of
https://github.com/markedjs/marked
synced 2024-11-22 00:05:53 +00:00
docs: fix heading renderer example (#3392)
This commit is contained in:
parent
0a3b2569fa
commit
ead7af34a5
@ -72,7 +72,8 @@ import { marked } from 'marked';
|
||||
|
||||
// Override function
|
||||
const renderer = {
|
||||
heading(text, depth) {
|
||||
heading({ tokens, depth }) {
|
||||
const text = this.parser.parseInline(tokens);
|
||||
const escapedText = text.toLowerCase().replace(/[^\w]+/g, '-');
|
||||
|
||||
return `
|
||||
|
Loading…
Reference in New Issue
Block a user