0

我需要什么markdown语法来编写如下的api。 在此处输入图像描述

html代码如下:
链接

<dl class="function">
<dt id="create_bootstrap_script">
<code class="descname">create_bootstrap_script</code><span class="sig-paren">(</span><em>extra_text</em><span class="sig-paren">)</span><a class="headerlink" href="#create_bootstrap_script" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a bootstrap script from <code class="docutils literal"><span class="pre">extra_text</span></code>, which is like
this script but with extend_parser, adjust_options, and after_install hooks.</p>
</dd></dl>

<p>This returns a string that (written to disk of course) can be used
as a bootstrap script with your own customizations. The script
will be the standard virtualenv.py script, with your extra text
added (your extra text should be Python code).</p>
<p>If you include these functions, they will be called:</p>

我尝试过使用这样的语法,但结果却是一样但不一样。

    Orange(a, b)
:   The fruit of an evergreen tree of the genus Citrus.

在此处输入图像描述

每一个答案将不胜感激。

4

1 回答 1

0

在第一个示例中,这dt是一个应用了语法突出显示的代码跨度。

在第二个示例中,dt仅包含纯文本。您也可以通过使用代码跨度来更接近:

`Orange(a, b)`
:   The fruit of an evergreen tree of the genus Citrus.

请注意,第一行包含在反引号 ( `) 中,这使其成为代码跨度。当然,您仍然需要语法高亮来获得精确匹配,但 MkDocs 目前不支持代码跨度的语法高亮,仅支持代码块。大概 virtualenv 文档是使用 Sphinx 而不是 MkDocs 构建的。虽然 MkDocs 在外观上接近于匹配 Sphinx,但它不匹配功能,这是差异之一。也就是说,可以使用自定义主题和/或使用一些自定义 Markdown 扩展。

于 2017-02-28T17:06:56.337 回答