WP-Markdown-Syntax-Sugar

WP Markdown Syntax Sugar work in conjunction with plugins such as wp-markdown and wp-highlight.js. Markdown is fantastic markup for easily writing blogs, and highlight.js is an extremely easy way to highlight code examples. In most cases, highlight.js automatically detects the proper language for a block of code. In certain cases, primarily if your code example is short, highlight.js could improperly detect the language that you are using; that is where this plugin comes into play. By adding one line to your code blocks, you can explicitly set the language that you are using, allowing highlight.js to properly format your code.

The concept is inspired by the wp-markdown-syntax-highlight plugin.

The usage is extremely simple. Just add a shebang as the first line of your code example with the language you are using.

#!ruby
class Foo < Bar
  def hello
    puts "Hello World!"
  end
end

The shebang is removed, and the code is outputted as:

<pre><code class="language-ruby">class Foo < Bar
  def hello
    puts "Hello World!"
  end
end</code></pre>

Now the code block is properly formatted for highlight.js to do its magic, and the code snippet will be properly highlighted.

Goodbye Syntax Highlighter

For years I've used Alex Gorbatchev's 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. I've decided to start blogging using Markdown. Making this move I needed to find a way to highlight .........

Similar: 63%

Syntax Highlighter Lite

This plugin prettifies/beautifies/highlights source code placed inside <pre class="prettyprint"> tags. It is a light plugin with only 2 files....

Similar: 45%

Code Prettify

Uses the Google Code Prettify library that is minified and properly enqueued. Plugin applies code highlighting automatically to all <pre> and <code> tags on the page....

Similar: 45%

SyHi

This plug-in is totally designed for developers. You know, that sort of people who post code snippets in their blog regularly and hardly use the Visual Editor, because they write the HTML themselves. But they don't like WordPress messing with their quotes and dashes, so this plug-in makes sure no o.........

Similar: 43%

SyntaxHighlighter Evolved: Fortran

SyntaxHighlighter Evolved: Fortran is a plugin for self-hosted WordPress installations that adds support to Alex Mills' (Viper007) SyntaxHighlighter Evolved plugin for the Fortran language. It provides a brush designed to work with the SyntaxHighlighter Evolved WordPress plugin. To be able to use t.........

Similar: 43%

scGeSHi

Simple code highlighting plugin for your remote source files It is powered by the GeSHi engine which supports a large number of programming languages The plugin is using styles like Code Snippet. Thanks to Roman Roan and Wyatt Neal. In addition, I would like to thank Jürgen Mayer for making the ba.........

Similar: 43%

Pygments for WordPress

This WordPress plugin is a syntax highlighter for many different computer languages, including HTML, Python, PHP, Javascript, CSS, and many others. It uses the Pygments syntax highlighter from Python. See http://derek.simkowiak.net/pygments-for-wordpress/ for full documentation....

Similar: 43%

WP Chili

Easy code highlighting for WordPress with Chili (the bundled version is 2.2): Switch to the code tab Put your code snippet inside <code class="lang"></code> tags Replace the above lang with the language to highlight ...

Similar: 37%

Wp-Syntax Hacktify

A plugin allowing you to change the WP-Syntax code highlighting color scheme elegantly. WP-Syntax rawks for writing about geeky stuff, but I want it more blacker. And I want a CSS file to hack instead of those icky and inefficient inline styles. I got the basic idea from WP-Syntax-Colorizer but w.........

Similar: 20%

WP Code Highlight

WP Code Highlight provides syntax highlighting of source code snippets and it is W3C valid. Wrap code blocks with <pre> and </pre> It provides a code button(HTML editor) to help you insert code in articles easily. You don't need to specify the language since WP Code Highlight will gues.........

Similar: 10%