Open ronny-rentner opened 1 month ago
There is a difference between "Marked Extension" and "Custom Extension" see #3182 and The two hardest things in computer science
And this difference is necessary? What's the idea behind it? Why not treat any kind of extension the same and simplify things?
A marked extension can have multiple custom extensions, tokenizer extensions, and renderer extensions. Yes this is necessary mostly for legacy reasons. It would be great to clean it up but there will be many extensions that would break.
On https://marked.js.org/using_pro#use it's being said I can use
marked.use(myExtension, extension2, extension3);
to load my custom extension but this doesn't work.On https://marked.js.org/using_pro#extensions you learn that you actually have to use
marked.use({ extensions: [description] });
with the keyextensions
.The first version does not work but there's also no error message. Just nothing happens which is bad because you start guessing around why nothing happens and why your extension is not being used.