git-svn-id: https://plugins.svn.wordpress.org/prismatic/trunk@1521291 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
Jeff Starr 2016-10-24 18:04:06 +00:00
parent ec9b0ff0c2
commit ff08257a2b

View File

@ -154,7 +154,7 @@ Likewise, to indicate HTML as the language for a multi-line code snippet:
So the prefix of the class names are the same for Prism.js and Highlight.js. The difference is the language identifier used to specify each language. Check out the following "About Prism.js" and "About Highlight.js" sections for more information.
__Note:__ In addition to detecting the `language-` and `lang-` prefixes, Highlight.js also will try to auto-detect the language without it being specified. Plus as an option, you can enable the Highlight.js setting, "Support no-prefix class names" to enable use of language identifiers without any `language-` or `lang-` prefix.
__Note:__ In addition to detecting the language- and lang- prefixes, Highlight.js also will try to auto-detect the language without it being specified. Plus as an option, you can enable the Highlight.js setting, "Support no-prefix class names" to enable use of language identifiers without any language- or lang- prefix.
@ -164,29 +164,29 @@ Just like Prism.js and Highlight.js, the Prismatic plugin follows HTML coding st
1. Visit the Prismatic General Settings and choose your library
2. Enable "Code Escaping" via the settings tab of your chosen library
3. Do one of the following:
* Wrap single-line code with code tags: `<code>...</code>`
* Wrap multi-line code with pre &amp; code tags: `<pre><code>...</code></pre>`
3. Do one of the following:]
* Wrap multi-line code with pre &amp; code tags: &lt;pre&gt;&lt;code&gt;...&lt;/code&gt;&lt;/pre&gt;
* Wrap single-line code with code tags: &lt;code&gt;...&lt;/code&gt;
For example, the code snippets included in either of the following markup examples would be escaped:
This is a single-line example, <code><?php echo 'Hello world'; ?></code>.
This is a single-line example, &lt;code&gt;&lt;?php echo 'Hello world'; ?&gt;&lt;/code&gt;.
This is a multi-line code example:
This is a multi-line code example:
<pre><code>
<table>
<tr>
<th>Name</th>
<th>Side</th>
<th>Role</th>
<tr>
<td>Darth</td>
<td>Dark</td>
<td>Sith</td>
</tr>
</table>
</code></pre>
&lt;pre&gt;&lt;code&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Side&lt;/th&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;tr&gt;
&lt;td&gt;Darth&lt;/td&gt;
&lt;td&gt;Dark&lt;/td&gt;
&lt;td&gt;Sith&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/code&gt;&lt;/pre&gt;
So what exactly happens when the "Code Escaping" options are enabled? Here is a summary that applies to each section (post content, excerpts, and comments):