Syntax Highlighting Test

Mar 23, 2017


    Syntax highlighting, here are some tests.

    Ruby:

    def print_hi(name)
      puts "Hi, #{name}"
    end
    print_hi('TuanPi')
    #=> prints 'Hi, Pi' to STDOUT.

    Python with line numbers:

    1
    2
    3
    4
    5
    
    def print_hi(name):
        print("Hi, {}".format(name))
    
    print_hi('TuanPi')
    # prints 'Hi, Pi' to STDOUT.
    

    C with line numbers:

    1
    2
    3
    4
    5
    
    void print_hi(string name) {
      printf("Hi, %s", name);
    }
    print_hi("TuanPi");
    /* prints 'Hi, TuanPi' to STDOUT. */