Hi,
With regards to the commonmark-attributes-extension, I've tried many different ways but I can't figure out how to add an attribute to the <pre> tag in a fenced code block. When I try, it ends up adding the attribute to a <code> tag inside the <pre> tag. The reason I ask is for line highlighting with the PrismJS line highlighting extension. You must add a data-line="4-6" attribute to the <pre> tag to highlight the lines you want.
'''typescript
console.log('test');
'''
{:data-line="1"}
I tried the above but like I said it adds it to a <code> tag. How would I target a fenced code block's <pre> tag?
Thank you for PHP CommanMark, love it!
Hi,
With regards to the
commonmark-attributes-extension, I've tried many different ways but I can't figure out how to add an attribute to the<pre>tag in a fenced code block. When I try, it ends up adding the attribute to a<code>tag inside the<pre>tag. The reason I ask is for line highlighting with the PrismJS line highlighting extension. You must add adata-line="4-6"attribute to the<pre>tag to highlight the lines you want.'''typescript console.log('test'); ''' {:data-line="1"}I tried the above but like I said it adds it to a
<code>tag. How would I target a fenced code block's<pre>tag?Thank you for PHP CommanMark, love it!