带有十进制格式的嵌套编号列表

问题描述 投票:0回答:1

我有一个项目符号列表,其中有一个编号的子列表,我无法按照我的要求进行格式化。

- foo
- bar
   1. some
   1. thing
   1. else
- baz

在GitHub上,这呈现为:

 - foo
 - bar
     i. some
    ii. thing
   iii. else
 - baz

我想要的是:

 - foo
 - bar
     1. some
     2. thing
     3. else
 - baz

以下问题似乎没有帮助https://github.com/github/markup/issues/210

这不是Markdown: What's the proper way to do a continued list inside of a list?的副本,因为这是关于如何在更高级别的列表元素中继续编号。

markdown github-flavored-markdown
1个回答
2
投票

这不是真正的Markdown问题; Markdown关注语义,而不是表达。这是关于如何生成<ol>样式。

GitHub不允许自定义样式的渲染标记,包括将list-style-type设置为decimal。你坚持他们选择的款式。


¹例如,请参阅How to add color to Github's README.md fileWhich inline html styles does GitHub markdown accept?How to retain HTML formatting in GitHub readme file upon upload?

© www.soinside.com 2019 - 2024. All rights reserved.