Plugin Directory

Changeset 647604


Ignore:
Timestamp:
01/03/2013 10:01:20 PM (13 years ago)
Author:
dwhitevisoft
Message:

v0.1.1 Release

Location:
goodbye-syntax-highlighter/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • goodbye-syntax-highlighter/trunk/goodbye-syntax-highlighter.php

    r585170 r647604  
    22/*
    33Plugin Name: goodbye-syntax-highlighter
    4 Plugin URI: http://www.visoftinc.com
     4Plugin URI: https://github.com/visoft/goodbye-syntax-highlighter
    55Description: Say goodbye to syntaxhighlighter and hello to highlight.js
    6 Version: 0.1.0
     6Version: 0.1.1
    77Author: Damien White (Visoft, Inc.)
    88Author URI: http://www.visoftinc.com
     
    4242    // covert csharp into cs
    4343    if ($language == 'csharp') $language = 'cs';
    44     return '<pre><code class="'. $language . '">' . $code . '</code></pre>';
     44    return '<pre><code class="language-'. $language . '">' . $code . '</code></pre>';
    4545}
  • goodbye-syntax-highlighter/trunk/readme.txt

    r585170 r647604  
    44Tags: highlight.js, syntax, code, pre, highlight, syntaxhighlighter
    55Requires at least: 3.1
    6 Tested up to: 3.4.1
    7 Stable tag: 0.1.0
     6Tested up to: 3.5
     7Stable tag: 0.1.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1414For years I've used [Alex Gorbatchev's SyntaxHighlighter](http://alexgorbatchev.com/SyntaxHighlighter/). It has served me well over the years. When I moved to WordPress I tried various plugins based on the library, such [SyntaxHighlighter Evolved](http://wordpress.org/extend/plugins/syntaxhighlighter/).
    1515
    16 I've decided to start blogging using [Markdown](http://daringfireball.net/projects/markdown/). Making this move I needed to find a way to highlight various bits of sourcecode in an easy way. There are many nice libraries that make this a snap, such as [google-code-prettify](http://code.google.com/p/google-code-prettify/) or [highlight.js](http://softwaremaniacs.org/soft/highlight/en/). In the end I decided to go with highlight.js, for the simple reason that it is automatic, working flawlessly with Markdown's code syntax output.
     16I've decided to start blogging using [Markdown](http://daringfireball.net/projects/markdown/). Making this move I needed to find a way to highlight various bits of source code in an easy way. There are many nice libraries that make this a snap, such as [google-code-prettify](http://code.google.com/p/google-code-prettify/) or [highlight.js](http://softwaremaniacs.org/soft/highlight/en/). In the end I decided to go with highlight.js, for the simple reason that it is automatic, working flawlessly with Markdown's code syntax output.
    1717
    1818Great, but my existing source code examples use SyntaxHighlighter's style for code blocks (using `<pre class="brush: ruby;" />`, for example). I could have converted things in a few ways:
     
    2323* Write a WP plugin and reformat things easily **Ding Ding Ding**
    2424
    25 So there you have it. This WordPress plugin will go through and process your SyntaxHighlighter style blocks into ones that highlight.js works with out-of-the-box. Nothing is changed in the DB, so if you decide to go back to SyntaxHighlighter, you can without any issues.
     25So there you have it. This WordPress plugin will go through and process your SyntaxHighlighter style blocks into ones that highlight.js works with out-of-the-box. It will also add the language that you have specified with the `brush` class and add it as a class on the `<code />` element ([following the HTML5 recommendation](http://www.w3.org/html/wg/drafts/html/master/text-level-semantics.html#the-code-element)). Nothing is changed in the DB, so if you decide to go back to SyntaxHighlighter, you can without any issues.
    2626
    2727== Installation ==
     
    3636= 0.1.0 =
    3737* Initial release
     38= 0.1.1 =
     39* Modified output to use the HTML5 recommended syntax highlighting class names, e.g. `language-ruby`. For more information, see [the HTML5 spec](http://www.w3.org/html/wg/drafts/html/master/text-level-semantics.html#the-code-element)
Note: See TracChangeset for help on using the changeset viewer.