You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem I'm facing is that there's no way to access markdown-it's slf.renderAttrs(token) from within a custom highlight function. Because I can't access slf.renderAttrs(token), there's no way for to take advantage of the rendering that the https://www.npmjs.com/package/markdown-it-attrs extension provides.
I can think of a couple of ways of solving this:
markdown-it passes the slf object as a new third argument when it calls a custom highlight function.
markdown-it makes either slf or slf.renderAttrs(token) available on this when it calls a custom highlight function.
I've created some custom code for this issue here:
Hi. I've trying to use
markdown-it
together with the https://www.npmjs.com/package/markdown-it-attrs extension.I'm passing a custom
highlight
function tomarkdown-it
to generate custom code block HTMLThe problem I'm facing is that there's no way to access
markdown-it
'sslf.renderAttrs(token)
from within a customhighlight
function. Because I can't accessslf.renderAttrs(token)
, there's no way for to take advantage of the rendering that the https://www.npmjs.com/package/markdown-it-attrs extension provides.I can think of a couple of ways of solving this:
markdown-it
passes theslf
object as a new third argument when it calls a customhighlight
function.markdown-it
makes eitherslf
orslf.renderAttrs(token)
available onthis
when it calls a customhighlight
function.I've created some custom code for this issue here:
The text was updated successfully, but these errors were encountered: