Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Apr 2016
    Posts
    0

    New bbcode highlighter

    New bbcode highlighter


    We have added a new bbcode called “highlighter” which is used for generic syntax highlighting. It supports a wide range of popular languages.

    Usage :
    [ highlight=language ]
    Codes
    [ /highlight ]

    Sample Java code:
    java Code:

    public static String backslashQuotes(String s) {
    if (s != null) {
    int len = s.length();
    StringBuffer buf = new StringBuffer(len + 10);
    char c = '\0';
    for (int i = 0; i < len; i++) {
    c = s.charAt(i);
    if (c == '"') {
    buf.append('\\');
    }
    buf.append(c);
    }

    return buf.toString();
    }
    else {
    return null;
    }
    }




  2. #2

    New bbcode highlighter

    Here is the list of languages supported by this new bbcode:

    actionscript
    ada
    apache
    asm
    asp
    bash
    caddcl
    cadlisp
    c_mac
    c
    cpp
    csharp
    css-gen.cfg
    css
    delphi
    diff
    div
    d
    eiffel
    gml
    html4strict
    java
    javascript
    lisp
    lua
    matlab
    mpasm
    nsis
    objc
    oobas
    oracle8
    pascal
    perl
    php-brief
    php
    python
    qbasic
    smarty
    sql
    vbnet
    vb
    vhdl
    visualfoxpro
    xml

  3. #3

    New bbcode highlighter

    Excellent! Now we don't have to have "PHP Code:" preceding our Java examples just to get the pretty colors...

    Thanks!


    Yawmark
    class Sig{public static void main(String...args){\u0066or(int
    \u0020$:"v\"ʲ\"vΤ\"".to\u0043h\u0 061rArray()
    )System./*goto/*$/%\u0126//^\u002A\u002Fout.print((char)(($>>
    +(~'"'&'#'))+('<'>>('\\'/'.')/\u002Array.const(~1)\*\u002F)));}}

  4. #4

    New bbcode highlighter

    Great!


    Great! This little piece of tool is really convenient!
    But for SQL, does it support all variations of sql?


    When the programming world turns decent, the real world will turn upside down.

  5. #5
    Administrator
    Join Date
    May 2015
    Posts
    1,143
    But for SQL, does it support all variations of sql?

    I have no idea. Try it and see!


    ~Nemi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •