Title: wp-prism
Author: mqudsi
Published: <strong>2018 年 1 月 14 日</strong>
Last modified: 2018 年 1 月 14 日

---

搜尋外掛

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://s.w.org/plugins/geopattern-icon/wp-prism.svg)

# wp-prism

 由 [mqudsi](https://profiles.wordpress.org/computerguru/) 開發

[下載](https://downloads.wordpress.org/plugin/wp-prism.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/wp-prism/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/wp-prism/#reviews)
 * [開發資訊](https://tw.wordpress.org/plugins/wp-prism/#developers)

 [技術支援](https://wordpress.org/support/plugin/wp-prism/)

## 外掛說明

wp-prism brings GitHub-styled code-fencing and prism-powered syntax highlighting
to your WordPress installation, written from scratch to be as freaky fast as possible.

wp-prism currently supports syntax highlighting for 41 languages and _only loads
the JavaScript and CSS to highlight your syntax when needed._

You can say goodbye to page bloat and long load times, because it makes no sense
to do this any other way.

### What it does

wp-prism does exactly what it says on the box: it takes a code-fenced block of source
code nested in your WordPress pages and posts, like this:

    ```
        `rust
    fn main() {
        println!("Hello, world!");
    }
        `
    ```

And turns into a syntax-highlighted work of art, like this:

    ```
    `rust
    ```

fn main() {
 println!(“Hello, world!”); } `<h3>How to install</h3> Just grab a copy
ofwp-prism\` from the WordPress plugins repository or clone our github repo from
[https://github.com/neosmart/wp-prism](https://github.com/neosmart/wp-prism).

There is no configuration needed.

### Avoiding whitespace mangling

WordPress (well, TinyMCE) loves to mangle whitespace in posts. As such, wp-prism
supports (and recommends) embedding your code fragments in `<pre>` tags if you’re
going to use the visual editor (or will use the visual editor at any point). wp-
prism detects the outer `<pre>` and takes care not to emit a second `<pre>` tag 
in such cases.

To illustrate with an example:

    ```
    <pre>
        `cpp
    void Greet(const char *name)
    {
        printf("Hello %s!\n", name);
    }
        `
    </pre>

    `cpp
    ```

void Greet(const char *name)
 { printf(“Hello %s!\n”, name); } `

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈wp-prism〉的開發相關工作。

參與者

 *   [ mqudsi ](https://profiles.wordpress.org/computerguru/)

[將〈wp-prism〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/wp-prism)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/wp-prism/)、查看
[SVN 存放庫](https://plugins.svn.wordpress.org/wp-prism/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/wp-prism/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/wp-prism/)。

## 中繼資料

 *  版本 **0.1**
 *  最後更新 **9 年前**
 *  啟用安裝數 **少於 10 次**
 *  語言
 * [English (US)](https://wordpress.org/plugins/wp-prism/)
 *  [進階檢視](https://tw.wordpress.org/plugins/wp-prism/advanced/)

## 評分

這個項目尚無任何評論記錄。

[撰寫評分](https://wordpress.org/support/plugin/wp-prism/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/wp-prism/reviews/)

## 參與者

 *   [ mqudsi ](https://profiles.wordpress.org/computerguru/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/wp-prism/)