Title: Syntax Highlighter with PrismJS
Author: mohamad wael
Published: <strong>2022 年 11 月 9 日</strong>
Last modified: 2022 年 11 月 9 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/syntax-highlighter-prismjs.svg)

# Syntax Highlighter with PrismJS

 作者：[mohamad wael](https://profiles.wordpress.org/mwaelk/)

[下载](https://downloads.wordpress.org/plugin/syntax-highlighter-prismjs.0.0.1.zip)

 * [详情](https://cn.wordpress.org/plugins/syntax-highlighter-prismjs/#description)
 * [评价](https://cn.wordpress.org/plugins/syntax-highlighter-prismjs/#reviews)
 * [开发进展](https://cn.wordpress.org/plugins/syntax-highlighter-prismjs/#developers)

 [支持](https://wordpress.org/support/plugin/syntax-highlighter-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」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ mohamad wael ](https://profiles.wordpress.org/mwaelk/)

[帮助将「Syntax Highlighter with PrismJS」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/syntax-highlighter-prismjs)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/syntax-highlighter-prismjs/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/syntax-highlighter-prismjs/)，或
通过[RSS](https://plugins.trac.wordpress.org/log/syntax-highlighter-prismjs/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/syntax-highlighter-prismjs/)。

## 更新日志

#### 0.0.1

 * initial release.

## 额外信息

 *  版本 **0.0.1**
 *  最后更新：**4 年前**
 *  活跃安装数量 **不到10**
 *  已测试的最高版本为 **6.1.10**
 *  语言
 * [English (US)](https://wordpress.org/plugins/syntax-highlighter-prismjs/)
 * 标签
 * [highlighter](https://cn.wordpress.org/plugins/tags/highlighter/)[prism](https://cn.wordpress.org/plugins/tags/prism/)
   [syntax highlighter](https://cn.wordpress.org/plugins/tags/syntax-highlighter/)
 *  [高级视图](https://cn.wordpress.org/plugins/syntax-highlighter-prismjs/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/syntax-highlighter-prismjs/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/syntax-highlighter-prismjs/reviews/)

## 贡献者

 *   [ mohamad wael ](https://profiles.wordpress.org/mwaelk/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/syntax-highlighter-prismjs/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://www.paypal.com/donate?hosted_button_id=QHHP2H5JN358N)