Category Archives: WP-GeSHi-Highlight

WP-GeSHi-Highlight 1.3.0 released

I have released version 1.3.0 of WP-GeSHi-Highlight. WP-GeSHi-Highlight is a popular code syntax highlighting plugin for WordPress, based on the established PHP highlighting library GeSHi.

These are the changes compared to version 1.2.3:

  • Enhance compatibility of the default stylesheet with a large range of themes by increasing the specificity of certain CSS selectors and by adding more style directives. This ensures a better out-of-the-box experience. Thanks to Pascal Krause for reporting an incompatilibity with Twenty Ten.
  • Increase compatibility with CDNs: fix double slash appearing in CSS file URL.
  • Remove redundant call to wp_register_style().
  • Change style sheet ID prefix, add newline characters to GeSHi CSS code output.
  • Improve code documentation and readability.

In fact, this update contains a considerably consolidated default stylesheet (with just a minimal set of changes). I have verified that it works well with all recent versions of the important official themes:

  • Twenty Ten (version 1.9)
  • Twenty Eleven (version 2.1)
  • Twenty Twelve (version 1.7)
  • Twenty Thirteen (version 1.5)
  • Twenty Fourteen (version 1.4)
  • Twenty Fifteen (version 1.2)

I have also tested the new default style sheet with the following popular themes: Vantage, Customizr, ColorWay, Zerif Lite, Responsive, Storefront, Virtue, evolve, Make, Sparkling, Spacious, Enigma, Sydney, Point, Interface, SinglePage.

I want to use this opportunity to stress how much I like the recent community developments around WP-GeSHi-Highlight. Almost five years have passed since I first released this plugin to the WP repository, and I never really put effort into spreading it. Nevertheless, according to the WordPress statistics, it is used on more than one thousand websites. I have searched the web to find a few examples about who uses this plugin for which purpose, and want to share two of my findings:

  • In this StackOverflow thread, Aaron Bertrand, a ninja database expert, revealed that he likes the GeSHi-based approach so much (and he uses WP-GeSHi-Highlight in his blogs), that he was willing to provide a huge bounty to someone helping him out to improve the syntax highlighting for the T-SQL language in subtle ways. Another ninja joined the discussion for helping Aaron, and Aaron had more wishes like “There’s always one little extra thing, right? I promise this is it. I want to color the N prefix on Unicode strings in red.”. They found their solution, great. I proposed to them to contribute their findings upstream, straight to GeSHi, so that I, further downstream, can incorporate them in WP-GeSHi-Highlight at some point. I love this.

  • On Make Create Reiterate, Tina Dvyver uses WP-GeSHi-Highlight (and writes about it) as of its support for an exotic language in the world of highlighters, X++. What I like about her blog is that she actually took her time to adjust the default stylesheet to her needs, and that she came up with a neat way to hide the dots in the numbered list, when using line numbering. She writes about it here.

One more thing I want to mention: in the past days I had a productive discussion with two users of this plugin, in this support thread. Turns out that WP-GeSHi-Highlight was not responsible for the issue reported there, but this discussion still lead to fixing the double-slash issue mentioned above in the change log. It also lead to me knowing of one more person who actively transitioned from WP-Syntax to WP-GeSHi-Highlight, and to one more review on the wordpress.org plugin page.

I realize that I should put more effort into spreading this plugin, as it has obvious architectural advantages over heavy client-side highlighters. Unfortunately, most of the “Top X syntax highlighting plugins for WordPress” blog posts around the web do not really clarify the significant difference between back-end highlighters and client-side ones. I’ll possibly cover that in a future blog post.

WP-GeSHi-Highlight 1.2.3 released

I have released version 1.2.3 of WP-GeSHi-Highlight. WP-GeSHi-Highlight is a popular code syntax highlighting plugin for WordPress, based on the established PHP highlighting library GeSHi.

The only change in this realease:

  • The bundled GeSHi library was updated to version 1.0.8.12.

So far, there are no official release notes for GeSHi 1.0.8.12. However, the commit history clarifies that this update involves various language file improvements as well as newcomers. A list of those languages that are affected by the update (manually crafted):

  • PHP
  • Rust
  • TCL
  • CSS
  • Haskell
  • PostScript
  • QML
  • NSIS
  • Nimrod
  • Oxygene
  • LSL2
  • StandardML
  • Oxygene

With this update in place, WP-GeSHi-Highlight supports syntax highlighting for 240 languages.

Documentation, FAQ, and comments can be found at gehrcke.de/wp-geshi-highlight.

Websites using WP-GeSHi-Highlight: a NerdyData search

For some time now I am maintaining WP-GeSHi-Highlight, a code syntax highlighting plugin for WordPress, based on the established PHP highlighting library GeSHi.

The plugin has a very basic feature set, and I have never really promoted it — still, I was wondering how popular it is. I mean, it just works, reliably, and therefore it is a quite appropriate choice for many types of WordPress sites.

I came across NerdyData, a search engine for website source code:

We index the HTML, Javascript, CSS, and plaintext of hundreds of millions of pages.

Honestly, their web interface makes a pretty crappy impression. Nevertheless, It found about 140 websites that include the term “wp-geshi-highlight” in their source: https://search.nerdydata.com/search/#!/searchTerm=wp-geshi-highlight/searchPage=1/sort=pop

This is a short list of some web pages using WP-GeSHi-Highlight, found via NerdyData:

When seeing this, I found interesting that many make use of the simple customization and deviate from the default styling of WP-GeSHi-Highlight code blocks.

WP-GeSHi-Highlight 1.2.2 released

I have released WP-GeSHi-Highlight 1.2.2. WP-GeSHi-Highlight is a code syntax highlighting plugin for WordPress, based on the established PHP highlighting library GeSHi.

This are the changes compared to version 1.2.0:

  • Improve CSS normalization (add box-shadow: none to pre block).
  • Use plugin_dir_path/url() instead of obsolete WP_PLUGIN_DIR/URL constants (improve compatibility with HTTPS-driven websites).
  • Remove obsolete screenshot from release.
  • Minor code cleanup.

WP-GeSHi-Highlight 1.2.0 released

I have released a new version of WP-GeSHi-Highlight. It includes a brand new default CSS file which works great with established themes such as twentytwelve and twentythirteen. It contains basically the same CSS code I am using here on my website. One example (Python):

>>> "wp" + "-" + "geshi" + "-" + "highlight"
'wp-geshi-highlight'

Furthermore, I have incorporated all upstream changes from GeSHi, straight away from their git repo. This brings along tons of language updates, even for bash.

For more information about WP-GeSHi-Highlight, you might want to visit http://gehrcke.de/wp-geshi-highlight.