Browse Source

update

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

+ 14
- 16
readme.txt View File

@@ -132,27 +132,25 @@ 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> (Prism.js only)

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 (Prism.js only):
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 (Prism.js only):

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

Likewise, to indicate HTML as the language for a multi-line code snippet:

<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>
&lt;pre&gt;&lt;code class="language-html"&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 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.



Loading…
Cancel
Save