0.0.6 • Published 2 years ago

reveal.js-eliminate-empty-lines v0.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

reveal.js-eliminate-empty-lines

A Reveal.js plugin to eliminate line breaks in <pre> tags in lines that don't contain anything other than an html tag.

Installation

npm i reveal.js-eliminate-empty-lines

Usage

Add the plugin:

  <script type="module">
    import RevealEliminateEmptyLines from "reveal.js-eliminate-empty-lines";

    import Reveal from "reveal.js";

    let deck = new Reveal({
      plugins: [RevealEliminateEmptyLines],
    });
    deck.initialize();
  </script>

Now you can write this HTML (much easier to read):

<section>

<pre>
<code class="rust">
<span class="fragment fade-in">
struct Person {
  <span class="fragment fade-in">
  name: String,
  age: u32
  </span>
}
</span>
<span class="fragment fade-in">
struct C;
</span>
</code>
</pre>

</section>

And it would be rendered like this:

<section>

<pre><code class="rust"><span class="fragment fade-in visible" data-fragment-index="0">struct Person {
<span class="fragment fade-in visible" data-fragment-index="1">  name: String,
  age: u32</span>
}</span>
<span class="fragment fade-in visible current-fragment" data-fragment-index="2">struct C;</span></code></pre>

</section>
0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago