Skip to content

Commit add3736

Browse files
Unescaped Markup: More doc regarding comments (#2652)
This makes the explanation of the usage of comments clearer and gives examples.
1 parent 8e66049 commit add3736

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

plugins/unescaped-markup/index.html

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,23 @@ <h1>How to use</h1>
2424
<p>This plugin provides several methods of achieving the same thing:</p>
2525

2626
<ul>
27-
<li>Instead of using <code>&lt;pre>&lt;code></code> elements, use <code>&lt;script type="text/plain"></code>
28-
<pre><code>&lt;script type="text/plain" class="language-markup">
27+
<li>
28+
Instead of using <code>&lt;pre>&lt;code></code> elements, use <code>&lt;script type="text/plain"></code>:
29+
30+
<pre><code>&lt;script type="text/plain" class="language-markup">
2931
&lt;p>Example&lt;/p>
3032
&lt;/script></code></pre>
3133
</li>
32-
<li>Use a HTML-comment to escape your code
33-
<pre><code>&lt;pre class="language-markup">&lt;code>&lt;!--
34+
<li>
35+
Use an HTML-comment to escape your code:
36+
37+
<pre><code>&lt;pre class="language-markup">&lt;code>&lt;!--
3438
&lt;p>Example&lt;/p>
35-
-->&lt;/code>&lt;/pre></code></pre></li>
39+
-->&lt;/code>&lt;/pre></code></pre>
40+
41+
This will only work if the <code>code</code> element contains exactly one comment and nothing else (not even spaces).
42+
E.g. <code>&lt;code> &lt;!-- some text -->&lt;/code></code> and <code>&lt;code>text&lt;!-- more text -->&lt;/code></code> will not work.
43+
</li>
3644
</ul>
3745
</section>
3846

0 commit comments

Comments
 (0)