Skip to content

use extensions with renderer #3061

Answered by UziTech
robertIsaac asked this question in Q&A
Oct 28, 2023 · 2 comments · 5 replies
Discussion options

You must be logged in to vote

By passing the renderer in to the options you are overwriting the renderer in gfmHeadingId.

You can set the renderer first and then overwrite the heading renderer with gfmHeadingId.

marked.use({renderer: new Renderer()});
marked.use(gfmHeadingId());
const text = marked.parse(this.originalText)

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@robertIsaac
Comment options

Answer selected by robertIsaac
Comment options

You must be logged in to vote
4 replies
@robertIsaac
Comment options

@robertIsaac
Comment options

@UziTech
Comment options

@robertIsaac
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants