掌握Markdown翻译(Mastering Markdown)(3)

in #cn7 years ago

  例子

  • 代码

    下面虽然是一个示例,但是要补充说明一下,代码块有几种表示方式,一种是在文本中直接用单引号包裹即可,这个单引号就是键盘上数字1左边的那个字符,我找了半天怎么输入,原来是打开了中文输入法的原因。另外一种方式是把代码块缩进四个空格,还有一种方式是用三个单引号包裹,并且还可以指示代码所用的语言,这样就有语法高亮的效果。

    There are many different ways to style code with GitHub's markdown. If you have inline code blocks, wrap them in backticks: `var example = true`.  If you've got a longer block of code, you can indent with four spaces:
    
        if (isAwesome){
          return true
        }
    
    GitHub also supports something called code fencing, which allows for multiple lines without indentation:
    
    ​```
    if (isAwesome){
      return true
    }
    ​```
    
    And if you'd like to use syntax highlighting, include the language:
    
    ​```javascript
    if (isAwesome){
      return true
    }
    ​```
    
  • There are many different ways to style code with GitHub’s markdown. If you have inline code blocks, wrap them in backticks: var example = true. If you’ve got a longer block of code, you can indent with four spaces:

    if (isAwesome){
      return true
    }
    

    GitHub also supports something called code fencing, which allows for multiple lines without indentation:

    if (isAwesome){
      return true
    }
    

    And if you’d like to use syntax highlighting, include the language:

    if (isAwesome){
      return true
    }
    
  • 补充

    Github也支持一些定制Markdown格式,比如,@somebody表示引用某人。[ x ],表示任务列表,​以“:”​开头的一些单词还可以表示一些表情图标。

GitHub supports many extras in Markdown that help you reference and link to people. If you ever want to direct a comment at someone, you can prefix their name with an @ symbol: Hey @kneath — love your sweater!

But I have to admit, tasks lists are my favorite:

- [x] This is a complete item
- [ ] This is an incomplete item

When you include a task list in the first comment of an Issue, you will see a helpful progress bar in your list of issues. It works in Pull Requests, too!

And, of course emoji! :sparkles: :camel: :boom:

GitHub supports many extras in Markdown that help you reference and link to people. If you ever want to direct a comment at someone, you can prefix their name with an @ symbol: Hey @kneath — love your sweater!

But I have to admit, tasks lists are my favorite:

  • This is a complete item
  • This is an incomplete item

When you include a task list in the first comment of an Issue, you will see a helpful progress bar in your list of issues. It works in Pull Requests, too!

And, of course emoji!

=====================================================
掌握Markdown翻译(Mastering Markdown)(1)
掌握Markdown翻译(Mastering Markdown)(2)

Coin Marketplace

STEEM 0.25
TRX 0.20
JST 0.036
BTC 94318.14
ETH 3449.94
USDT 1.00
SBD 3.49