Title: Prettify GC Syntax Highlighter
Author: lexn
Published: <strong>16.02.2011</strong>
Last modified: 28.08.2012

---

Поиск плагинов

Этот плагин **не тестировался с последними 3 основными выпусками WordPress**. Скорее
всего, он уже не поддерживается и может быть несовместим с текущими версиями WordPress.

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

# Prettify GC Syntax Highlighter

 Автор: [lexn](https://profiles.wordpress.org/lexn/)

[Скачать](https://downloads.wordpress.org/plugin/prettify-gc-syntax-highlighter.1.6.0.zip)

 * [Детали](https://ru.wordpress.org/plugins/prettify-gc-syntax-highlighter/#description)
 * [Отзывы](https://ru.wordpress.org/plugins/prettify-gc-syntax-highlighter/#reviews)
 *  [Установка](https://ru.wordpress.org/plugins/prettify-gc-syntax-highlighter/#installation)
 * [Разработка](https://ru.wordpress.org/plugins/prettify-gc-syntax-highlighter/#developers)

 [Поддержка](https://wordpress.org/support/plugin/prettify-gc-syntax-highlighter/)

## Описание

This plugin has prettify.js copied directly from google-code source browser. So 
your code will look exactly like it does on google-code.
 CSS is slightly modified
to embolden keywords and types.

### License

See prettify.js for license details (Apache License 2.0). Other files are available
under GPLv2.

### Usage

<pre class="prettyprint">
 // Put your code here. </pre>

Or with shortcode:

    ```notranslate
      // Put your code here.
    ```

### Making Code HTML Safe

The plugin automatically makes highlighted code html-safe:

<pre class="prettyprint">
 Anything that goes here will be quoted to appear on the
page as-is. For example: <head></head><body></body> </pre>

To avoid quoting your code, add **dontquote** as the first class.

<pre class="dontquote prettyprint">
 Remember to quote manually. For example: &lt;
head&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt; </pre>

### Line Numbering

Line numbdering can be enabled as follows:

<pre class="prettyprint linenums">
 // Put your code here. </pre>

If you want to start with a line number 42, you can do the following:

<pre class="prettyprint linenums:42">
 // Put your code here. </pre>

### Highlighting Lines

When line numbering is enabled you can highlight one or several lines of code using
the highlight class:

<pre class="prettyprint lang-YOURLANG linenums highlight:2,4">
 // line 2 // line
3 // line 4 </pre>

Alternatively you can highlight one or several code segments:

<pre class="prettyprint lang-YOURLANG linenums highlight:1-3,5-6">
 // line 2 //
line 3 // line 4 // line 5 </pre>

Note: This feature is not available when line numbering is disabled.

### Specifying Language

Most of the time the highlighter will do a good job guessing how to highlight the
code. However, to achieve the best result, you should specify the language:

<pre class="prettyprint lang-YOURLANG">
 // Put your code here. </pre>

Replace YOURLANG with one of the following:

 * aea
 * agc
 * apollo
 * bsh
 * c
 * cc
 * cl
 * cpp
 * cs
 * csh
 * css-str
 * cv
 * cxx
 * cyc
 * default-markup
 * el
 * fs
 * go
 * hs
 * htm
 * html
 * java
 * js
 * json
 * lisp
 * lua
 * m
 * ml
 * mxml
 * perl
 * pl
 * pm
 * proto
 * py
 * rb
 * scala
 * scm
 * sh
 * sql
 * vhd
 * vhdl
 * wiki
 * xhtml
 * xml
 * xsl
 * yaml
 * yml

### Shortcode

Here is a quick example. All the parameters are optional.

    ```notranslate
      // Put your code here.
    ```

Html quoting can be disabled as follows:

    ```notranslate
      // Put your code here.
    ```

The contents of shortcodes is auto-formatted by WP. As a result <p> and <br/> tags
along
 with some formatting will be lost. If you need to preseve the original formatting
use html notation instead of the shortcode.

### Please Support

If you like Prettify GC Syntax Highlighter plugin, please donate a minute of your
time and vote for it. Thank you!

## Скриншоты

[⌊How to use and a short example.⌉⌊How to use and a short example.⌉[

How to use and a short example.

[⌊A larger example with line numbers.⌉⌊A larger example with line numbers.⌉[

A larger example with line numbers.

## Установка

You can use the WordPress plugin installer:

 1. Go to: WpAdim -> Plugins -> Add New -> Upload.
 2. Simply upload the zip file and then click ‘Activate’.

Or you can install the plugin manually:

 1. Upload the content of the zip file to the `/wp-content/plugins/` directory.
 2. Then activate the plugin through the ‘Plugins’ menu in WordPress.

## Отзывы

Нет отзывов об этом плагине.

## Участники и разработчики

«Prettify GC Syntax Highlighter» — проект с открытым исходным кодом. В развитие 
плагина внесли свой вклад следующие участники:

Участники

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

[Перевести «Prettify GC Syntax Highlighter» на ваш язык.](https://translate.wordpress.org/projects/wp-plugins/prettify-gc-syntax-highlighter)

### Заинтересованы в разработке?

[Посмотрите код](https://plugins.trac.wordpress.org/browser/prettify-gc-syntax-highlighter/),
проверьте [SVN репозиторий](https://plugins.svn.wordpress.org/prettify-gc-syntax-highlighter/),
или подпишитесь на [журнал разработки](https://plugins.trac.wordpress.org/log/prettify-gc-syntax-highlighter/)
по [RSS](https://plugins.trac.wordpress.org/log/prettify-gc-syntax-highlighter/?limit=100&mode=stop_on_copy&format=rss).

## Журнал изменений

#### 1.6.0

 * Fixed «wp_register_style was called incorrectly» warnings.

#### 1.5.1

 * Fixed line highlight indices when using linenums.
 * Added shortcodes.

#### 1.4

 * Added an option to highlight one or serveral lines of code.

#### 1.3.1

 * Updated the language list.
 * Improved documentation.

#### 1.2

 * Improved htlm-friendly quote filter.
 * Added line numbering support.
 * Added overflow support.

#### 1.1

 * The first public version.

## Мета

 *  Версия **1.6.0**
 *  Обновление: **14 лет назад**
 *  Активных установок: **20+**
 *  Версия WordPress ** 3.0.5 или выше **
 *  Совместим вплоть до: **3.4.2**
 *  Язык
 * [English (US)](https://wordpress.org/plugins/prettify-gc-syntax-highlighter/)
 * Метки:
 * [google code](https://ru.wordpress.org/plugins/tags/google-code/)[prettify](https://ru.wordpress.org/plugins/tags/prettify/)
   [syntax highlighter](https://ru.wordpress.org/plugins/tags/syntax-highlighter/)
 *  [Дополнительно](https://ru.wordpress.org/plugins/prettify-gc-syntax-highlighter/advanced/)

## Оценки

 4.3 из 5 звёзд.

 *  [  2 5-звездный отзыв     ](https://wordpress.org/support/plugin/prettify-gc-syntax-highlighter/reviews/?filter=5)
 *  [  0 4-звездный отзыв     ](https://wordpress.org/support/plugin/prettify-gc-syntax-highlighter/reviews/?filter=4)
 *  [  1 3-звездный отзыв     ](https://wordpress.org/support/plugin/prettify-gc-syntax-highlighter/reviews/?filter=3)
 *  [  0 2-звездный отзыв     ](https://wordpress.org/support/plugin/prettify-gc-syntax-highlighter/reviews/?filter=2)
 *  [  0 1-звездный отзыв     ](https://wordpress.org/support/plugin/prettify-gc-syntax-highlighter/reviews/?filter=1)

[Ваш отзыв](https://wordpress.org/support/plugin/prettify-gc-syntax-highlighter/reviews/#new-post)

[Посмотреть всеотзывы](https://wordpress.org/support/plugin/prettify-gc-syntax-highlighter/reviews/)

## Участники

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

## Поддержка

Есть что сказать? Нужна помощь?

 [Перейти в форум поддержки](https://wordpress.org/support/plugin/prettify-gc-syntax-highlighter/)