Skip to content

Commit

Permalink
Line Numbers plugin instructions clarifications (#1719)
Browse files Browse the repository at this point in the history
This fixes typos and makes clarifies some instructions of the Line Numbers plugin.
  • Loading branch information
bruceontheloose authored and RunDevelopment committed Feb 8, 2019
1 parent 217a6ea commit 00f4f04
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugins/line-numbers/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ <h2>Line Numbers</h2>
<h1>How to use</h1>

<p>Obviously, this is supposed to work only for code blocks (<code>&lt;pre>&lt;code></code>) and not for inline code.</p>
<p>Add class <strong>line-numbers</strong> to your desired <code>&lt;pre></code> and line-numbers plugin will take care.</p>
<p>Add the <strong>line-numbers</strong> class to your desired <code>&lt;pre></code>, and the line-numbers plugin will take care of the rest.</p>
<p>Optional: You can specify the <code>data-start</code> (Number) attribute on the <code>&lt;pre></code> element. It will shift the line counter.</p>
<p>Optional: To support multiline line numbers using soft wrap add css <code>white-space</code> to <code>pre-line</code> or <code>pre-wrap</code>.</p>
<p>Optional: To support multiline line numbers using soft wrap, apply the CSS <code>white-space: pre-line;</code> or <code>white-space: pre-wrap;</code> to your desired <code>&lt;pre></code>.</p>
</section>

<section>
Expand All @@ -49,9 +49,10 @@ <h2>Unknown languages</h2>
<pre class="language-none line-numbers"><code>This raw text
is not highlighted
but it still has
lines numbers</code></pre>
line numbers</code></pre>

<h2>Soft wrap support</h2>
<p>Please note the <code>style="white-space:pre-wrap;"</code> in the code below.</p>
<pre class="line-numbers" data-src="plugins/line-numbers/index.html" data-start="-5" style="white-space:pre-wrap;"></pre>

</section>
Expand Down

0 comments on commit 00f4f04

Please sign in to comment.