Example for markdown-pretty

Example for markdown-pretty

Here is a small example for highlighting c code:

#include <stdio.h>

/**
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
int main(int argh, char* argv[]) {
    printf("Hello\n");
    return 0;
}

Here is a small example for highlighting java code:

package com.google.mr4c;

/**
 * Copyright 2014 Google Inc. All rights reserved.
 * Unless required by applicable law or agreed to in writing.
 */
public class AlgoRunner {
    public static void main(String argv[]) throws Exception {
        AlgoRunnerConfig config = new AlgoRunnerConfig(true);
        config.setCommandLineArguments(argue);
        config.configure();
        AlgoRunner runner = new AlgoRunner(config);
        runner.executeStandalone();
    }
}

Here is a small example for highlighting python code:

#!/usr/bin/env python
import os
import sys

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example.settings")
    from django.core.management import execute_from_command_line
    execute_from_command_line(sys.argv)
}

Here is a small example for highlighting shell code:

nam install hero -g

done.

发表评论

电子邮件地址不会被公开。 必填项已用*标注