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