markdown 代码块语言标记

Markdown语法中代码块的常用标识:

  • C
    -- c、cpp
char *str = "c/cpp";
  • C#
    -- c#、c-sharp、csharp
string str = "csharp";
  • Java
    -- java
String str = "java";
  • Go
    -- go、golang
str := "golang";
  • Objective-C
    -- objc、obj-c
NSString *str = @"objc";
  • Swift
    -- swift
var str = "swift";
  • Shell
    -- bash、shell
echo "bash"
  • CSS
    -- css
#div-size {
width: 10px;
height: 10px;
}
  • JavaScript
    -- js、jscript、javascript
var str = "javascript";
  • PHP
    -- php

  • Python
    -- py、python
str = "python";
  • Ruby
    -- ruby、rails、ror、rb
str = "ruby";
  • SQL
    -- sql
select * from table where name='mysql';

你可能感兴趣的:(markdown 代码块语言标记)