このプラグインは WordPress の最新3回のメジャーリリースに対してテストされていません。もうメンテナンスやサポートがされていないかもしれず、最新バージョンの WordPress で使用した場合は互換性の問題が発生する可能性があります。

Syntax Highlighter with PrismJS

説明

A syntax highlighter using PrismJs.

How To Use

Wrap your pre tag as shown below:

[sh_prismjs_pre class="language-py line-numbers match-braces rainbow-braces" data_line="1,4-5,7" escape_html='escape']
<pre>    
class Implements_Ne:
    ''' A class which implements 
        the __ne__ method '''
    def __ne__( self, other):
        return False

class Not_Implements_Ne:
    ''' A class which does not
        implement the __ne__
        method '''
    pass
</pre>
[/sh_prismjs_pre]
  • Replace name in language-NAME, by the name of the language that you wish to highlight. For example if the language is python, language-NAME should become language-py .
  • If you wish line numbers to appear, use line-numbers .
  • If you wish braces to be matched when selected use match-braces .
  • If you wish to have rainbow braces use rainbow-braces .
  • If you wish to highlight lines, you can use data_line, so in the example provided, colorize line 1, and colorize lines from 4 to 5, and colorize line 7.
  • If you wish the content of the pre to be escaped, so for example if it contains html tags that you do not wish to be rendered, you can use escape_html=’escape’

For code tags, they also should be wrapped as follows:

[sh_prismjs_code class="language-html" escape_html='escape']<code>tag: <br/></code>[/sh_prismjs_code]

You must use the language-Name option, and you can use the escape_html option.

評価

このプラグインにはレビューがありません。

貢献者と開発者

Syntax Highlighter with PrismJS はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献しています。

貢献者

“Syntax Highlighter with PrismJS” をあなたの言語に翻訳しましょう。

開発に興味がありますか ?

コードを閲覧するか、SVN リポジトリをチェックするか、開発ログRSS で購読してみてください。

変更履歴

0.0.1

  • initial release.