在同一列表项中正确标记多个嵌套列表
Correctly marking up multiple nested lists within the same list item
在 GitHub .md
文件中,我试图编写相当于:
<ul>
<li>This is a list item</li>
<li>This is also a list item
<ul>
<li>...containing a sublist</li>
<li>with two items.</li>
</ul>
and then...
<ul>
<li>another sublist</li>
<li>which also has two items</li>
</ul>
</li>
<li>This is a third list item</li>
</ul>
我已经尝试了多种变体:
- This is a list item
- This is also a list item
- ...containing a sublist
- with two items.
and then...
- another sublist
- which also has two items
- This is a third list item
但我还没有找到如何在单个无序列表项中成功嵌套多个单独的无序列表。
我应该如何标记行 and then...
以便它(以及之后的每一行)在 GitHub 风格的降价中正确呈现?
您可以使用假项目符号列表来实现此目的。您可以使用不间断空格和 ⦁(Z NOTATION SPOT)字符构建它们。
- This is a list item
- This is also a list item
⦁ ...containing a sublist
⦁ with two items.
and then...
⦁ another sublist
⦁ which also has two items
- This is a third list item
结果:
这是一个列表项
这也是一个列表项
⦁ ...包含一个子列表
⦁ 有两个项目。
然后...
⦁ 另一个子列表
⦁ 也有两项
这是第三个列表项
在 GitHub .md
文件中,我试图编写相当于:
<ul>
<li>This is a list item</li>
<li>This is also a list item
<ul>
<li>...containing a sublist</li>
<li>with two items.</li>
</ul>
and then...
<ul>
<li>another sublist</li>
<li>which also has two items</li>
</ul>
</li>
<li>This is a third list item</li>
</ul>
我已经尝试了多种变体:
- This is a list item
- This is also a list item
- ...containing a sublist
- with two items.
and then...
- another sublist
- which also has two items
- This is a third list item
但我还没有找到如何在单个无序列表项中成功嵌套多个单独的无序列表。
我应该如何标记行 and then...
以便它(以及之后的每一行)在 GitHub 风格的降价中正确呈现?
您可以使用假项目符号列表来实现此目的。您可以使用不间断空格和 ⦁(Z NOTATION SPOT)字符构建它们。
- This is a list item
- This is also a list item
⦁ ...containing a sublist
⦁ with two items.
and then...
⦁ another sublist
⦁ which also has two items
- This is a third list item
结果:
这是一个列表项
这也是一个列表项
⦁ ...包含一个子列表
⦁ 有两个项目。然后...
⦁ 另一个子列表
⦁ 也有两项这是第三个列表项