便便代码人生

关注技术, 偶尔动动手

[原] 给LilyBBS新增源代码语法高亮功能

Posted by bianbian on 2008-05-06 21:12

本文Tags: ,

原文:[公告] WEB新增源代码语法高亮功能

使用方法:
[code]
代码
[/code]

目前支持:C/C++、Java、Python、Bash、SQL、HTML、XML、CSS、Javascript、Makefile、Ruby、PHP、Awk、Perl

效果示例:

#include <stdio.h>
int main() {
    printf
(“Many people think they are full of niubility,”);
}

import org.bianbian.code;
class CodeTest() {
   
public static void main(String[] args) {
       
System.out.println(“and like to play zhuangbility,”);
   
}
}

<?php
    echo
‘which only reflect their shability.’;
?>

采用的是prettify,为LilyBBS的客户端解析UBB做了点修改。推荐一下,还是挺好用的。

标签: ,

遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道

相关日志

2 Responses to “[原] 给LilyBBS新增源代码语法高亮功能”

  1. zhou Says:

    我是来提交BUG REPORT的
    Python的thread模块被识别成keyword了,嗯,就这样.。
    具体参见
    http://bbs.nju.edu.cn/bbscon?board=Python&file=M.1228119691.A&num=262
    js代码干嘛混淆啊,又不大,我还试图找出哪儿错了来着……果然还是算了囧

  2. bianbian Says:

    没混淆,只是pack了一下,让网络传输的数据小一点。
    原始文件在这里:http://bbs.nju.edu.cn/jssrc/bbs.full.js

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

(required)