Skip to content

Custom tokenizer/renderer for @mention and #hashtags? #3060

Answered by UziTech
ysk3a asked this question in Q&A
Discussion options

You must be logged in to vote

There are two types of extension:

  1. Extensions that change existing tokenizers/renderers
  2. Extensions that add new tokenizers/renderers

The Tokenizer in marked options is for the extensions that change existing tokenizers. To add new tokenizers you will need to use marked.use to add an extension.

It doesn't look like SvelteMarkdown allows the type of extension that adds new tokenizers/renderers.

I would suggest adding a feature request for SvelteMarkdown to be able to send extensions to marked.use.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ysk3a
Comment options

@UziTech
Comment options

@ysk3a
Comment options

Answer selected by ysk3a
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