Markdown专题研究_Span系列 4/4: Code 篇

CODE



  • To indicate a span of code, wrap it with backtick quotes (`). Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example:

    Use the `printf()` function.
    will produce in HTML:

Use the printf() function.
  • To include a literal backtick character within a code span, you can use multiple backticks as the opening and closing delimiters:

    ``There is a literal baxktick (`) here``
    which will produce this:

There is a literal backtick (`) here.
  • The backtick delimiters surrounding a code span may include spaces — one after the opening, one before the closing. This allows you to place literal backtick characters at the beginning or end of a code span:

    A single backtick in a code span: `` ` ``
    A backtick-delimited string in a code span: `` `foo\`
    will produce:

A single backtick in a code span: `
A backtick-delimited string in a code span: `foo`

你可能感兴趣的:(Markdown专题研究_Span系列 4/4: Code 篇)