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
<?php
$str="The best language in the world!!!";
echo $str;
?>
- Python
-- py、python
str = "python";
- Ruby
-- ruby、rails、ror、rb
str = "ruby";
- SQL
-- sql
select * from table where name='mysql';
网友评论