Tony Brix

Results 609 comments of Tony Brix
trafficstars

It would be a great time to tackle async renderers. This PR is mostly a proof of concept. Sort of to flesh out the idea and see what problems we...

This still seems to me like it can be solved better by providing all of the tokens in a hook. I feel like the amount of work needed to make...

This is on the v2 project board but does not have a PR yet. If someone would like to start a PR this would go faster.

basically we just need to change [/src/Parser.js](https://github.com/markedjs/marked/blob/master/src/Parser.js) to call the renderers asynchronously without slowing down the parser.

Just awaiting every render call will probably slow down the parser quite a bit.

Not sure. That is what needs to be figured out to get async renderers working.

That could work. Or maybe have an `async` option and use a different parser that awaits the renderer calls. That way the default renderer doesn't change speed, and have a...

Ya it might work better to create a separate parser so we don't have the conditional logic on each renderer call. ```js try { // ... if (opt.async) return await...

I started implementing a solution for this in #2405

The biggest problem with making marked asynchronous in any of these ways is that most users won't use it but it will still slow it down for them. Even #2405...