如果要標(biāo)記一小段行內(nèi)代碼,你可以用反引號(hào)把它包起來(lái)(`
),例如:
Use the `printf()` function.
會(huì)產(chǎn)生:
<p>Use the <code>printf()</code> function.</p>
如果要在代碼區(qū)段內(nèi)插入反引號(hào),你可以用多個(gè)反引號(hào)來(lái)開(kāi)啟和結(jié)束代碼區(qū)段:
``There is a literal backtick (`) here.``
這段語(yǔ)法會(huì)產(chǎn)生:
<p><code>There is a literal backtick (`) here.</code></p>
代碼區(qū)段的起始和結(jié)束端都可以放入一個(gè)空白,起始端后面一個(gè),結(jié)束端前面一個(gè),這樣你就可以在區(qū)段的一開(kāi)始就插入反引號(hào):
A single backtick in a code span: `` ` `` A backtick-delimited string in a code span: `` `foo` ``
會(huì)產(chǎn)生:
<p>A single backtick in a code span: <code>`</code></p> <p>A backtick-delimited string in a code span: <code>`foo`</code></p>
在代碼區(qū)段內(nèi),&
和尖括號(hào)都會(huì)被自動(dòng)地轉(zhuǎn)成 HTML 實(shí)體,這使得插入 HTML 原始碼變得很容易,Markdown 會(huì)把下面這段:
Please don't use any `<blink>` tags.
轉(zhuǎn)為:
<p>Please don't use any <code><blink></code> tags.</p>
你也可以這樣寫(xiě):
`—` is the decimal-encoded equivalent of `—`.
以產(chǎn)生:
<p><code>&#8212;</code> is the decimal-encoded equivalent of <code>&mdash;</code>.</p>
更多建議: