Browse Source

update

git-svn-id: https://plugins.svn.wordpress.org/prismatic/trunk@1521326 b8457f37-d9ea-0310-8a92-e5e31aec5664
master
Jeff Starr 7 years ago
parent
commit
445d89b521
1 changed files with 19 additions and 17 deletions
  1. +19
    -17
      readme.txt

+ 19
- 17
readme.txt View File

@@ -132,13 +132,13 @@ Once the settings are configured, you can enable syntax highlighting for any cod
* Wrap multi-line code with pre & code tags: <pre><code>...</code></pre>
* Wrap single-line code with code tags: <code>...</code>

Note: Prism.js highlights both multi-line and single-line code snippets. Highlight.js only supports multi-line code snippets.
__Note:__ Prism.js highlights both multi-line and single-line code snippets. Highlight.js only supports multi-line code snippets.

With the proper markup in place, you can indicate a specific language by adding a class of language-*** or lang-*** to the <code> tag (where *** is the language identifier). For example, to indicate PHP as the language for a single-line code snippet:

<code class="language-php"><?php echo 'Hello world'; ?></code>

Likewise, to indicate HTML as the language for a multi-line code snippet (note: if you are reading this plugin's raw readme.txt file, [click here](https://wordpress.org/plugins/prismatic/installation/) to read the formatted text):
Likewise, to indicate HTML as the language for a multi-line code snippet:

<pre><code class="language-html">
<table>
@@ -172,23 +172,25 @@ Just like Prism.js and Highlight.js, the Prismatic plugin follows HTML coding st

For example, the code snippets included in either of the following markup examples would be escaped:

This is a single-line example, &lt;code&gt;&lt;?php echo 'Hello world'; ?&gt;&lt;/code&gt;.
This is a single-line example:

This is a multi-line code example (note: if you are reading this plugin's raw readme.txt file, [click here](https://wordpress.org/plugins/prismatic/installation/) to read the formatted text):
<code class="language-php"><?php echo 'Hello world'; ?></code>.

This is a multi-line code example:
&lt;pre&gt;&lt;code&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;table&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;th&gt;Name&lt;/th&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;th&gt;Side&lt;/th&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;th&gt;Role&lt;/th&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;Darth&lt;/td&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;Dark&lt;/td&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;Sith&lt;/td&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/tr&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/table&gt;<br>
&lt;/code&gt;&lt;/pre&gt;
<pre><code class="language-html">
<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>

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):



Loading…
Cancel
Save