Linux 软件免费装

Pygments for Wordpress

开发者 dereks443
更新时间 2011年10月3日 07:45
PHP版本: 2.5.0 及以上
WordPress版本: 3.2.1

标签

code colorize highlighter syntax highlight highlighting pygments hilite

下载

详情介绍:

This WordPress plugin is a syntax highlighter for many different computer languages, including HTML, Python, PHP, Javascript, CSS, and many others. It uses the Pygments syntax highlighter from Python. See http://derek.simkowiak.net/pygments-for-wordpress/ for full documentation.

安装:

This plugin depends on the command "pygmentize" being in the web server's path. With Ubuntu or Debian, this can be achieved by typing sudo apt-get install python-pygments After that, install this plugin like any other. Go to Admin > Plugins > Add New > Upload. If that's too easy for you, try this:
  1. Put it into /wp-content/plugins/ directory
  2. Activate it in the admin Plugin page.

升级注意事项:

Just copy the new version over the old version. This plugin does not use the database for anything.

常见问题:

Are all tabs really preserved?

Almost. Although the code is preserved correctly in the editor, as of this writing (2011-06-28) the Pygments "pygmentize" command trims all whitespace from the end of the lines when displaying in HTML. I didn't see an option to disable that behavior in the documentation. Other than that, formatting is preserved. My end goal is to make it preserve all tabs, such that a copy'n'paste from the web page would result in an exact MD5 match of the original.

更新日志:

1.0 0.1