Is there any way to use the following two attributes in a markdown code block (rather than using HTML)?
<code data-trim data-noescape>...</code>
I tried adding these programmatically once the page has loaded but they don't get used (makes sense). I have also looked to see whether I can always have these settings by passing them as an option to marked.js
/ markdown.js
but the plugins don't appear to allow this.
This relates to using Reveal.js - see documentation .
My current work around is using inline html instead:
<pre><code class="bash" data-noescape data-trim>
...
</code></pre>
The element attributes hack unfortunately doesn't seem to add empty attributes.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.