private static StringBuffer addLineNumbers(String s) {
        StringBuffer sb = new StringBuffer();
        StringTokenizer st = new StringTokenizer(s, "\n", true);
        int lineno = 1;
        String current;
        while(st.hasMoreTokens()){
            current = st.nextToken();
            sb.append(current.equals("\n") ?
                    getHTMLLineNo(lineno) + current :
                    getHTMLLineNo(lineno) + current + st.nextToken());
            lineno++;
        }
        return sb;
    }