Stackoverflow热门问题(二十三)-Markdown:列表承接上次的序号
如有翻译问题欢迎评论指出,谢谢。
这次的排版真难受,排半天,这个问题用typora很好解决,在那里用
3.
起头就好。
这次没有排名第三的,排版和我的冲突了,调整要很久,不想调整,而且它vote不到第一的十分一。
排版在我的编辑器里挺正常,发出来就格式不对了,有空我换个渲染插件,以后尽量避免这类的问题。
Markdown:列表承接上次的序号
-
orschiro asked:
- 我想让item3的序号从3开始,但因为中间的代码块导致它成了一个新的列表开头,有办法解决吗?
- 期望输出
1. item 1 2. item 2 `
<code>Code block</code>
` 3. item 3- 实际输出:
- item 1
- item 2
Code block
1.item 3
-
Answers:
- Macmade - vote: 781
- 在代码块前插入四个空格。
1. item 1 2. item 2
Code block
3. item 3
- Produces:
- item 1
- item 2
Code block
- item 3
-
DavidT - vote: 45
- 补充一下,为了在非代码块的其他地方继续列表序号,例如插入一段,可以在段落前加至少一格空格
- Markdown:
1. one 2. two three 3. four
- Output:
- one
- two
three - four
Markdown: continue numbered list
-
orschiro asked:
-
In the following markdown code I want
item 3
to start with list number 3. But because of the code block in between markdown starts this list item as a new list. Is there any way to prevent that behaviour?
我想让item3的序号从3开始,但因为中间的代码块导致它成了一个新的列表开头,有办法解决吗? -
Desired output:
期望输出 1. item 1 2. item 2 `
<code>Code block</code>
` 3. item 3-
Produced output:
实际输出:
- item 1
- item 2
Code block
1.item 3
-
In the following markdown code I want
-
Answers:
- Macmade - vote: 781
-
Use four spaces to indent content between bullet points
在代码块前插入四个空格。 1. item 1 2. item 2
Code block
3. item 3
- Produces:
- item 1
- item 2
Code block
- item 3
-
DavidT - vote: 45
-
As an extension to existing answers. For those trying to continue a numbered list after something other than a code block. For example a second paragraph. Just indent the second paragraph by at least 1 space.
补充一下,为了在非代码块的其他地方继续列表序号,例如插入一段,可以在段落前加至少一格空格 - Markdown:
1. one 2. two three 3. four
- Output:
- one
- two
three - four
-
As an extension to existing answers. For those trying to continue a numbered list after something other than a code block. For example a second paragraph. Just indent the second paragraph by at least 1 space.
共有 0 条评论