Pygmentizer settings

This module provides an input filter which does source code syntax highlighting by using Pygments.

Prerequisite

You need a working Pygments on your host.
See how to install Pygments.

Installation

  • Enable this module.
  • Go to admin/config/content/formats page, configure the text format in which you want to enable Pygmentizer.
  • In the configuration page check Highlight inline codes with Pygments. It'd be better to give Pygmentizer a lower weight or say a higher priority.
  • At bottom of configuration page switch to settings tab of Pygmentizer.
  • Set your Pygments' binary path, choose the way you want to wrap your inline codes and pick a highlighting style for you web site.
  • As mentioned at first in settings tab, don't forget to allow HTML tags required by Pygmentizer if you have HTML Filter enabled.

Usage

Depends on the codes wrapper you choose, you can put inline codes in either <pygmentize[ lang=php|html|...]>...</pygmentize> or <code>. The former way makes it possible to specify language. However Pygments will try to guess it if not explicitly specified. The latter way works with HTML <code> tag.

Todo

  • Need to test under Windows environment.

Downloads

Version Downloads Date Links
7.x-1.0-alpha1 tar.gz (17.91 KB) | zip (19.12 KB) 2011-Mar-18 Notes

Project Information


Maintainers for Pygmentizer

  • zhangxiao - 4 commits
    last: 1 year ago, first: 1 year ago

Issues for Pygmentizer

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports
nobody click here