How to apply `data-trim` and` data-noescape` to markdown code block in Reveal.js?

Can the following two attributes be used in the markdown code block (instead of using HTML)?

<code data-trim data-noescape>...</code>

I tried to add them programmatically after the page loads, but they are not used (it makes sense). I also looked to see if I can always have these settings by passing them as the marked.js / markdown.js , but the plugins don't seem to allow this.

This applies to using Reveal.js - see the documentation .

+7
javascript
source share
1 answer

My current job uses inline html :

 <pre><code class="bash" data-noescape data-trim> ... </code></pre> 

hack attribute attributes , unfortunately, does not add empty attributes.

0
source share

All Articles