blog,
@blog@shkspr.mobi avatar

WordPress GeSHi Highlighting for Markdown
https://shkspr.mobi/blog/2024/05/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:

$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.

https://shkspr.mobi/blog/2024/05/wordpress-geshi-highlighting-for-markdown/

  • All
  • Subscribed
  • Moderated
  • Favorites
  • markdown
  • rosin
  • GTA5RPClips
  • vwfavf
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • Youngstown
  • ngwrru68w68
  • slotface
  • thenastyranch
  • ethstaker
  • khanakhh
  • kavyap
  • InstantRegret
  • normalnudes
  • modclub
  • osvaldo12
  • anitta
  • everett
  • Durango
  • cisconetworking
  • cubers
  • Leos
  • provamag3
  • tacticalgear
  • tester
  • megavids
  • JUstTest
  • All magazines