Tags: `ol`Aliases: `ol-prefix`Parameters:`style`: List style (`string`, default `one_or_ordered`, values `one` / `one_or_ordered` / `ordered` / `zero`)This rule is triggered for ordered lists that do not either start with '1.' ordo not have a prefix that increases in numerical order (depending on theconfigured style). The less-common pattern of using '0.' as a first prefix orfor all prefixes is also supported.Example valid list if the style is configured as 'one':1. Do this. 1. Do that. 1. Done. Examples of valid lists if the style is configured as 'ordered':1. Do this. 2. Do that. 3. Done. 0. Do this. 1. Do that. 2. Done. All three examples are valid when the style is configured as 'one_or_ordered'.Example valid list if the style is configured as 'zero':0. Do this. 0. Do that. 0. Done. Example invalid list for all styles:1. Do this. 3. Done. This rule supports 0-prefixing ordered list items for uniform indentation:... 08. Item 09. Item 10. Item 11. Item ... Note: This rule will report violations for cases like the following where animproperly-indented code block (or similar) appears between two list items and"breaks" the list in two:<!-- markdownlint-disable code-fence-style -->~~~markdownFirst listCode block Second list~~~The fix is to indent the code block so it becomes part of the preceding listitem as intended:~~~markdownFirst list Code block Still first list~~~<!-- markdownlint-restore -->Rationale: Consistent formatting makes it easier to understand a document.

发表评论 取消回复