Skip to content
This repository was archived by the owner on Jan 10, 2019. It is now read-only.

drm/Markdown_Geshi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Markdown_Geshi

A simple extension to the PHP Markdown implementation to add code highlighting to the wordpress plugin using GeSHi.

Installation

  • Install the PHP Markdown plugin
  • Install the wp-syntax plugin
  • Download the markdown-geshi.php file in your plugin folder
  • Enable all three plugins and you're good to go

Usage

The highlighter is triggered by adding a 'shebang' to the code block. The shebang follows the following syntax:

#!lang@123
code to be highlighted

lang is a language to use for highlighting and 123 is a line number to start the numbering with.

Example

#!php@12
while(true)
    echo "Infinite time...!";

Would render the code starting at while and starting with line number 12.

The line number is optional. If omitted, the lines will not be numbered.

If the shebang is omitted, the standard code block handler from the Markdown_Parser class is used.

Troubleshooting

If you have any trouble using the plugin, please report an issue at github.com

About

Adds GeSHi code highlighting to PHP Markdown.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages