Skip to content

Commit

Permalink
docs: fix heading renderer example (#3392)
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech authored Aug 7, 2024
1 parent 0a3b256 commit ead7af3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/USING_PRO.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `
Expand Down

0 comments on commit ead7af3

Please # to comment.