<commit_before># WP Colored Coding

Brings the cool Javascript syntax highlighter [Rainbow.js](https://github.com/ccampbell/rainbow) to your Wordpress-Blog and allows you to manage code snippets indipendend from the texteditor.

## Installation

Just [download](https://github.com/dnaber-de/WP-Colored-Coding/downloads) the plugin archive and follow the instructions on the [Wordpress Codex](http://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation).

## Setup

By default, the plugin is ready to use after activation. Some options can be changed on Settings → Writing.

### Raw output

This option enables an additional checkbox for each codeblock of a post which allows you to disable the `esc_attr()` filter for that code snippet. That means, every HTML and Javascript inside these textarea will be parsed by the browser as those. So be carefull with this option.

## Usage

### Codeblocks

A single Codeblock is identified (in the posts context) by its name. If you don't want to specify a name for each block, leave it empty, it will be generated automatically.

The language field is also optional. To use syntax highlighting, write in a rainbow supported language. (It will give you suggestions.) Currently these are
* c
* csharp
* css
* javascript
* lua
* python
* ruby
* shell
* sheme

These code can be placed in the text by using the shortcode [cc name="{name}"]. You can use the TinyMCE button »CC« for that.

### Shortcode (in-text code)

For just a fiew lines of code you may want to use the shortcode like so:

```
[cc lang="javascript"]
var str = 'Hello World';
alert( str );
[/cc]
```

## API

The following filters are provided:

* `wp_cc_rainbow_themes`
* `wp_cc_rainbow_scripts`
* `wp_cc_rainbow_languages`

Adding a new Theme is quite easy. Just expend the themes-array by a key like this
```PHP
/**
 * @param array $themes
 * @return array
 */
function my_new_rainbow_theme( $themes ) {
	$themes[ 'my_theme' ] = array(
		'src'  => //the absolute URI to the stylesheet
		'name' => 'My Theme'
	);<commit_msg>i need a markdown parser<commit_after># WP Colored Coding

Brings the cool Javascript syntax highlighter [Rainbow.js](https://github.com/ccampbell/rainbow) to your Wordpress-Blog and allows you to manage code snippets indipendend from the texteditor.

## Installation

Just [download](https://github.com/dnaber-de/WP-Colored-Coding/downloads) the plugin archive and follow the instructions on the [Wordpress Codex](http://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation).

## Setup

By default, the plugin is ready to use after activation. Some options can be changed on Settings → Writing.

### Raw output

This option enables an additional checkbox for each codeblock of a post which allows you to disable the `esc_attr()` filter for that code snippet. That means, every HTML and Javascript inside these textarea will be parsed by the browser as those. So be carefull with this option.

## Usage

### Codeblocks

A single Codeblock is identified (in the posts context) by its name. If you don't want to specify a name for each block, leave it empty, it will be generated automatically.

The language field is also optional. To use syntax highlighting, write in a rainbow supported language. (It will give you suggestions.) Currently these are
* c
* csharp
* css
* javascript
* lua
* python
* ruby
* shell
* sheme

Each codeblock can be placed anywhere in the text by using the shortcode [cc name="{name}"]. You can use the TinyMCE button »CC« for that.

### Shortcode (in-text code)

For just a fiew lines of code you may want to use the shortcode like so:

```
[cc lang="javascript"]
var str = 'Hello World';
alert( str );
[/cc]
```

## API

The following filters are provided:

* `wp_cc_rainbow_themes`
* `wp_cc_rainbow_scripts`
* `wp_cc_rainbow_languages`

Adding a new Theme is quite easy. Just expend the themes-array by a key like this
```PHP
/**
 * @param array $themes
 * @return array
 */
function my_new_rainbow_theme( $themes ) {
	$themes[ 'my_theme' ] = array(
		'src'  => //the absolute URI to the stylesheet
		'name' => 'My Theme'
	);
{'fraction_non_alphanumeric': 0.08763388510223953, 'fraction_numerical': 0.0, 'mean_word_length': 4.406578947368421, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6130286', 'n_tokens_mistral': 1256, 'n_tokens_neox': 1177, 'n_words': 553}