Open AleksandrHovhannisyan opened 2 years ago
In the meantime, in case this helps anyone else who runs into the same issue, I created this markdown-it plugin: https://github.com/AleksandrHovhannisyan/markdown-it-code-tabindex
Came here to report the same issue. markdown-it-attrs
actually mentions how to be compatible with it:
Remember to render attributes if you use a custom renderer.
Yup, markdown-it-prism
does this correctly for inline code blocks:
And uses regex match-and-replace for fenced code blocks:
One of the reasons I currently use
markdown-it-prism
is because it's compatible withmarkdown-it-attrs
, which allows me to specify any custom attribute on an as-needed basis. Like this: