Code Highlighter 演示
代码高亮显示:
Ruby:
def my_ruby_snippet
blog_post.should(be_highlighted)
end
C语言:
for( round = 0; round < 4; round++ )
{
for( i = 0; i < 16; i++ )
{
j = (4 - (i % 4)) & 0x3; /* handles the rotation of ABCD. */
s = S[round][i%4]; /* is the bit shift for this iteration. */
b = ABCD[(j+1) & 0x3]; /* Copy the b,c,d values per ABCD rotation. */
c = ABCD[(j+2) & 0x3]; /* This isn't really necessary, it just looks */
d = ABCD[(j+3) & 0x3]; /* clean & will hopefully be optimized away. */
/* The actual perumation function.
* This is broken out to minimize the code within the switch().
*/
switch( round )
{
case 0:
/* round 1 */
a = md5F( b, c, d ) + X[i];
break;
case 1:
/* round 2 */
a = md5G( b, c, d ) + X[ K[0][i] ];
break;
case 2:
/* round 3 */
a = md5H( b, c, d ) + X[ K[1][i] ];
break;
default:
/* round 4 */
a = md5I( b, c, d ) + X[ K[2][i] ];
break;
}
a = 0xFFFFFFFF & ( ABCD[j] + a + T[round][i] );
ABCD[j] = b + (0xFFFFFFFF & (( a << s ) | ( a >> (32 - s) )));
}
}
PHP:
function hello_world()
{
echo "hello world"
}
Popularity: 9%
使用wp-syntax.0.9.8,有问题,不支持PDF打印,郁闷!
摘要时没有代码显示!
换用Google Syntax Highlighter,上面2个问题解决,不过打印的PDF文档没有高亮!
就用这个了:SyntaxHighlighter version 2.0.320
最后一次修改了,就用这个了:SyntaxHighlighter Evolved,带有Settings。