Menu:

Recent Entries

Categories

Archives

Links

Blogs
- Dflying's Night
- David's Untitled Life
- Dflying's Blog in Chinese

This blog is hosted by DreamHost!

Syndicate

RSS 0.90
RSS 1.0
RSS 2.0
Atom 0.3

New Plug-in: PloGeSHi

Dflying | 25 February, 2006 01:06

GeSHi means Generic Syntax Highlighter, aims to be a simple but powerful highlighting class, with the following goals:

  1. Support for a wide range of popular languages
  2. Easy to add a new language for highlighting
  3. Highly customisable output formats.

More details please check out at: http://qbnz.com/highlighter/

This plug-in ports powerful PloGeSHi to LifeType, you may enable it from Manage -> PloGeSHi in admin page.

Here PloGeSHi support following lauguages' highlighting: Actionscript, ASM, ASP, Bash, C, C#, C++, CSS, Delphi, HTML, Java, Javascript, Lisp, Objective C, Pascal, Perl, PHP, Python, Smarty, SQL, VB.NET, Visual BASIC and XML.

Examples: ...


PHP Code:

You Type:

<code php>
/* A simple php script */
$choice = $_GET['foo'];
if ( $choice == 1 )
{
echo 'You like coffee!';
}
elseif ( $choice == 2 )
{
echo 'I said, "You like coffee!"';
}
echo "<br />"Isn't coffee horrible though?"";
</code>

You Get:

/* A simple php script */
$choice = $_GET['foo'];
if ( $choice == 1 )
{
  echo 'You like coffee!';
}
elseif ( $choice == 2 )
{
  echo 'I said, "You like coffee!"';
}
echo "<br />"Isn't coffee horrible though?"";
 

C Code:

You Type:

<code c>
/* silly C example for GeSHi */
#ifndef getenv
extern char *getenv ();
#endif

static char *
my_index (str, chr)
const char *str;
int chr;
{
while (*str)
{
if (*str == chr)
return (char *) str;
str++;
}
return 0;
}
</code>

You Get:

/* silly C example for GeSHi */
#ifndef getenv
extern char *getenv ();
#endif
 
static char *
my_index (str, chr)
     const char *str;
     int chr;
{
  while (*str)
    {
      if (*str == chr)
	return (char *) str;
      str++;
    }
  return 0;
}

Posted in LifeType. Comment: (0). Trackbacks:(191). Permalink
«Next post | Previous post»

Referers

Comments

Leave a Reply

Auth Image