Using <code>, I can post short code snippets without relying on Github. e.g,
// my first program in C++
#include
using namespace std;
int main ()
{
cout << "Hello World!";
return 0;
}
Habari has two plug-ins that cater especially to code snippets:
google-code-prettify allows syntax highlighting of source code snippets.
code_escape runs
htmlspecialchars()on anycodeblocks in your post.
Whilst in user/plugins, fetch both plug-ins from their subversion repositories:
$ svn checkout http://svn.habariproject.org/habari-extras/plugins/google-code-prettify/trunk google-code-prettify $ svn checkout http://svn.habariproject.org/habari-extras/plugins/code_escape/trunk code_escape
Make the following changes to plugins/code_escape/code_escape.plugin.php:
1 |
|