Title: Highlight Source Pro
Author: kno
Published: <strong>Igbe 7, 2008</strong>
Last modified: Igbe 10, 2008

---

Ṣàwárí àwọn plugin

Plugin yìí **kò tíì ṣe àyẹ̀wò pẹ̀lú àwọn ìtújáde mẹ́ta pàtàkì tó kẹ́yìn ti WordPress**.
Ó lè jẹ́ pé a kò tọ́jú tàbí ṣe àtìlẹ́yìn fún un mọ́, ó sì lè ní àwọn ọ̀ràn ìbámu
nígbà tí a bá lò ó pẹ̀lú àwọn ẹ̀yà WordPress tuntun.

![](https://s.w.org/plugins/geopattern-icon/highlight-source-pro.svg)

# Highlight Source Pro

 Láti ọwọ́ [kno](https://profiles.wordpress.org/kno/)

[Ṣe ìgbàsílẹ̀](https://downloads.wordpress.org/plugin/highlight-source-pro.1.3.zip)

 * [Àwọn àlàyé](https://yor.wordpress.org/plugins/highlight-source-pro/#description)
 * [Àwọn àgbéyẹ̀wò](https://yor.wordpress.org/plugins/highlight-source-pro/#reviews)
 *  [Ìgbéwọlẹ̀](https://yor.wordpress.org/plugins/highlight-source-pro/#installation)
 * [Ìdàgbàsókè](https://yor.wordpress.org/plugins/highlight-source-pro/#developers)

 [Ìrànlọ́wọ́](https://wordpress.org/support/plugin/highlight-source-pro/)

## Àpèjúwe

Powerful, flexible, XHTML-compliant, server-side code highlighting, credits for 
everything
 but ‘making it a plugin’ go to [Jay Pipes](http://jpipes.com/index.php?/archives/216-Syntax-Highlighting-and-Allowing-HTML-in-Comments.html)
and [GeSHi](http://geshi.org/).

#### Features

 * Highlight sources of any language
 * automatically, server-side (no javascripts)
 * XHTML-Compliant, `<div>`, `<ul>`, `<span>` with class-attributes and a css-file
   are used for styling
 * optionally add a heading for every code-block
 * optionally specify line-number offset (BREAKS XHTML COMPLIANCE)
 * optionally donÌtumọ̀ Yorùbá: ’t display line-numbers
 * set per-codeblock if the code is html_entity_encoded or not
 * only parses `<pre>`-tags with the `lang=`-attribute, thus does not interfere 
   with any regular preformatted contents you might have
 * degrades beautifully through `<pre>`-tags (if you keep the sources clean, that
   is)
 * all settings through logical, valid arguments for the main container
 * comes with generic cross-browser CSS (tested: IE5.5+, FF, Safari, Opera)

#### Version History

 * 1.3: Thanks to a tipp now the link-path to the stylesheets is correct, sorry 
   for the inconvenience
 * 1.2: Leading whitespace isnÌtumọ̀ Yorùbá: ’t stripped anymore (indents as well
   as newlines), when thereÌtumọ̀ Yorùbá: ’s no title the title-div is not being
   generated anymore
 * 1.1: Solved the issue with single-quotes being changed to typographical quotes

#### Known Issues

While the plugin is basically XHTML 1.0 Strict compliant thereÌtumọ̀ Yorùbá: ’s 
just no way of getting the offset-based line-numbering to display without inadequate(
ab)use of javascript and css hacks, so be warned that _IF you use the line-number
offset, your documents will **NOT** validate_ because of the forbidden `start=`-
attribute for the `<ol>`!

### Documentation

More on the [Highlight Source Pro Page](http://blog.kno.at/tools/highlight-source-pro/)

## Àwọn àwòrán ìbòjú

[⌊All-In-One Preview⌉⌊All-In-One Preview⌉[

All-In-One Preview

## Ìgbéwọlẹ̀

The plugin is simple to install:

 1. Upload the `highlight_source_pro` folder to your `/wp-content/plugins` directory
 2. Enable via Admin-Interface

#### How to Use

Set your code-blocks as `<pre>`-tags. If the language is supported by GeSHi (see
file list in the `/geshi-directory`) use the filename (without extension) as language-
attribute. If your code is encoded (html-entities; e.g. `<` is displayed as `&lt;`
Ìtumọ̀ Yorùbá: – most likely the case if you write in the visual editor) add the`
enc__`-prefix. For example for a php-codeblock you would start as follows:

    ```
    <pre lang="php">
    ```

You can control various things: * Start of Line-Offset, e.g. for #17: `<pre class
="17">` * define entity-encoded blocks, e.g. for php: `<pre lang="enc__php">` * 
Define a title for your code-block that appears inside the block, but above the 
code lines. Everything in the same line as the opening `<pre>` tag will be considered
the title, including HTML works fine:

    ```
            <pre lang="php"><strong>This is</strong> an <em>example</em> with a <h3>headline</h3>
    ```

* disable line numbers by not specifying an offset * combine all those things as
long as you stick to the right order:

## FAQ

  I use Self-Formatted Markup in older posts, whatÌtumọ̀ Yorùbá: ’s gonna happen?

As long as they arenÌtumọ̀ Yorùbá: ’t wrapped in `<pre>`-tags _with a `lang=`-attribute_
nothing is going to happen Ìtumọ̀ Yorùbá: – your markup will stay untouched. Highlight
Source Pro only hooks in for those `<pre>`-tags having a `lang=`-attribute.

  What about that class-abuse for line numbering???

The line-numbering is the one problem here, because Ìtumọ̀ Yorùbá: – currently Ìtumọ̀
Yorùbá: – it requires to break with the XHTML-Standard. Because the `<ol>` is always
and guaranteed inside a `<div>` with the `.geshi`-class there is no need for the`
class`-attribute on the list element. Also due to the fact that a CSS-classname 
is not allowed to start with a number, this solution is valid XHTML for downgrading
and _can never interfere with existing CSS-rules_.

  I can use all HTML for the title-line?

Yep. The basic idea is, once again, backwards compatibility. If you consider your
code-blocks being important youÌtumọ̀ Yorùbá: ’ll most likely want to add a heading
instead of just a line, on the other hand you can simply use the title-feature to
show which file is being talked about. Since the title-string will be placed inside
a `<div>` youÌtumọ̀ Yorùbá: ’ll be fine as long as thereÌtumọ̀ Yorùbá: ’s no line-
break (and your markup is valid)

  What about that html_entity_decode thing and the enc__ Ìtumọ̀ Yorùbá: – prefix??

ThereÌtumọ̀ Yorùbá: ’s two ways of handling code-listing in your original post source.
You can either use the HTML-input and hardcode PHP, C or whatever you think about,
statements in there, Highlight Source Pro will handle those listings without any
problems (in fact, itÌtumọ̀ Yorùbá: ’s the safer version to use for Highlighting
as all characters are present in their original form).

On the other hand this will get problematic if Ìtumọ̀ Yorùbá: – for any reason Ìtumọ̀
Yorùbá: – you stop using Highlight Source Pro, because WordPress (and every other
serious software) will strip lots of those listings for security and compatibility
reasons. If you want to be sure that your listings donÌtumọ̀ Yorùbá: ’t break when
moving to another platform you should consider using htmlentities() on your listings,
or writing them with the Visual Editor in the first place, so when falling back 
everything will be displayed as you want.

In this case youÌtumọ̀ Yorùbá: ’ll have to use the `enc__`-prefix to tell Highlight
Source Pro to apply `html_entity_decode()` before the actual syntax-highlighting.
While this might be the more _default_ case itÌtumọ̀ Yorùbá: ’s still the one requiring
the alteration with the prefix, for compatibility reasons. If encoded scripts would
be marked with the original language-signature and the source would later on be 
used in another GeSHi-environment things would get very, very complicated and confusing.

## Àwọn àgbéyẹ̀wò

Kò sí àwọn àgbéyẹ̀wò fún plugin yìí.

## Àwọn Olùkópa & Olùgbéejáde

“Highlight Source Pro” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí ti 
ṣe ìkópa sí plugin yìí.

Àwọn Olùkópa

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

[Túmọ̀ “Highlight Source Pro” sí èdè rẹ.](https://translate.wordpress.org/projects/wp-plugins/highlight-source-pro)

### Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?

[Ṣàwárí koodu](https://plugins.trac.wordpress.org/browser/highlight-source-pro/),
ṣàyẹ̀wò [ibi ìpamọ́ SVN](https://plugins.svn.wordpress.org/highlight-source-pro/),
tàbí ṣe àgbékalẹ̀ sí [àkọsílẹ̀ ìdàgbàsókè](https://plugins.trac.wordpress.org/log/highlight-source-pro/)
nípasẹ̀ [RSS](https://plugins.trac.wordpress.org/log/highlight-source-pro/?limit=100&mode=stop_on_copy&format=rss).

## Àkójọpọ̀ Meta

 *  Ẹ̀yà **1.3**
 *  Ìgbàgbọ́hùn tó kẹ́yìn **ọdún 18 sẹ́yìn**
 *  Àwọn ìgbéwọlẹ̀ tó ṣiṣẹ́ **30+**
 *  Ẹ̀yà WordPress ** 2.3 tàbí ju bẹ́ẹ̀ lọ **
 *  Dánwò dé **2.5**
 *  Èdè
 * [English (US)](https://wordpress.org/plugins/highlight-source-pro/)
 * Àwọn àmì
 * [code](https://yor.wordpress.org/plugins/tags/code/)[Highlight](https://yor.wordpress.org/plugins/tags/highlight/)
   [markup](https://yor.wordpress.org/plugins/tags/markup/)[source](https://yor.wordpress.org/plugins/tags/source/)
   [syntax](https://yor.wordpress.org/plugins/tags/syntax/)
 *  [Ìwòye Tó Péye](https://yor.wordpress.org/plugins/highlight-source-pro/advanced/)

## Àwọn ìbò

Kò sí ìwádìí tí a tíì fi ránṣẹ́.

[Your review](https://wordpress.org/support/plugin/highlight-source-pro/reviews/#new-post)

[Wo gbogbo àwọn àgbéyẹ̀wò](https://wordpress.org/support/plugin/highlight-source-pro/reviews/)

## Àwọn Olùkópa

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

## Ìrànlọ́wọ́

Nǹkan wà tí o fẹ́ sọ? Ṣé o nílò ìrànlọ́wọ́?

 [Wo àpéjọ ìrànlọ́wọ́](https://wordpress.org/support/plugin/highlight-source-pro/)

## Ṣe ìtọrẹ

Ṣé o fẹ́ ṣe àtìlẹ́yìn fún ìlọsíwájú plugin yìí?

 [ Ṣe ìtọrẹ sí plugin yìí ](http://tinyurl.com/3mjxz2)