Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unescaped Markup: More doc regarding comments #2652

Merged
merged 2 commits into from
Nov 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions plugins/unescaped-markup/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,23 @@ <h1>How to use</h1>
<p>This plugin provides several methods of achieving the same thing:</p>

<ul>
<li>Instead of using <code>&lt;pre>&lt;code></code> elements, use <code>&lt;script type="text/plain"></code>
<pre><code>&lt;script type="text/plain" class="language-markup">
<li>
Instead of using <code>&lt;pre>&lt;code></code> elements, use <code>&lt;script type="text/plain"></code>:

<pre><code>&lt;script type="text/plain" class="language-markup">
&lt;p>Example&lt;/p>
&lt;/script></code></pre>
</li>
<li>Use a HTML-comment to escape your code
<pre><code>&lt;pre class="language-markup">&lt;code>&lt;!--
<li>
Use an HTML-comment to escape your code:

<pre><code>&lt;pre class="language-markup">&lt;code>&lt;!--
&lt;p>Example&lt;/p>
-->&lt;/code>&lt;/pre></code></pre></li>
-->&lt;/code>&lt;/pre></code></pre>

This will only work if the <code>code</code> element contains exactly one comment and nothing else (not even spaces).
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.
</li>
</ul>
</section>

Expand Down