CommonMark 规范是否允许列表标记前有前导空格?

Does CommonMark spec allows leading spaces before the list marker?

这是 CommonMark 中的有效列表吗?

  1. Foo
     - Bar
     - Baz
  2. Qux

我担心每个列表标记前两个前导空格的有效性,即 1.2. 等。在列表标记前提供前导空格是否有效?

我在 http://spec.commonmark.org/0.27/.

的 CommonMark 规范中找不到任何明确提到在每个列表标记之前可以有前导空格的规范

但是有许多示例似乎显示列表标记之前使用的前导空格。例如,参见

但我希望规范清楚地说明在列表标记之前放置空格是有效的。你能在规范中找到任何清楚说明或至少暗示这一点的内容吗?

具体规则为规则4list items section (which starts right after example 246):

  1. Indentation. If a sequence of lines Ls constitutes a list item according to rule #1, #2, or #3, then the result of indenting each line of Ls by 1-3 spaces (the same for each line) also constitutes a list item with the same contents and attributes. If a line is empty, then it need not be indented.

示例 247, 248 and 249 then show one, two and three spaces respectively, all if which are interpreted as list items. Finally, example 250 显示四个空格的缩进导致一个代码块。

当然 indented blocks 的规则指出(强调):

An indented code block is composed of one or more indented chunks separated by blank lines. An indented chunk is a sequence of non-blank lines, each indented four or more spaces. The contents of the code block are the literal contents of the lines, including trailing line endings, minus four spaces of indentation.

因此,任何缩进少于四个空格的都不是代码块。几段之后我们发现以下内容:

If there is any ambiguity between an interpretation of indentation as a code block and as indicating that material belongs to a list item, the list item interpretation takes precedence:

给出的示例显示了一个缩进四个或更多空格的嵌套列表项。但是,同一个示例也将父列表项缩进了两个空格,因此该规则适用于两者。

为了对比,原来的 Markdown rules 明确指出:

List markers typically start at the left margin, but may be indented by up to three spaces.

这个概念在 Markdown 中已经存在很多年了。