WordPress GeSHi Highlighting for Markdown


I've launched a WordPress Plugin for an extremely niche use-case.

WP GeSHi Highlight Redux works with WordPress's Classic Editor to convert Markdown to syntax highlighted code.

That allows me to write:

```php
$a = "Hello";
$b = 5 * 2;
echo $a . str($b);
```

And have it displayed as:

PHP PHP$a = "Hello";
$b = 5 * 2;
echo $a . str($b);

I've previously written about the WP GeSHi Highlight plugin. My plugin is a fork of that. It has the following changes:

  • RSS & Atom feeds - disable code highlighting
  • Remove extra style wrappers
  • Markdown support
  • Remove line-numbers
  • Remove escape option (escape now permanent)
  • Remove TinyMCE changes
  • Remove custom CSS options
  • Improve default CSS
  • Improve HTML detection

These changes work for me, with my weird blogging set-up. If they work for you, feel free to use it. If they don't work for you, please fork and write your own code.

You can download WP GeSHi Highlight Redux or get the original plugin.


Share this post on…

  • Mastodon
  • Facebook
  • LinkedIn
  • BlueSky
  • Threads
  • Reddit
  • HackerNews
  • Lobsters
  • WhatsApp
  • Telegram

What are your reckons?

All comments are moderated and may not be published immediately. Your email address will not be published.

Allowed HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <p> <pre> <br> <img src="" alt="" title="" srcset="">