MD027 reports the indentation an indented code block inside a quote requires
- 主要言語
- Rust
- スター
- 407
- フォーク
- 12
- 平均マージ
- 5時間 45分
- マージ済み PR(30日)
- 30
説明
An indented code block inside a blockquote is written with four spaces of
indentation after the marker's own space, and MD027 counts all five as multiple
spaces after the marker. There is no way to write the block that the rule accepts.
## Reproduction
```markdown
> code block
```
`1:7: MD027 Multiple spaces after blockquote symbol`, in 0.3.2 and on `main`.
mdl 0.17.0 reports it too.
`>` plus one space is the prefix MD027 asks for, and an indented code block needs
four spaces of its own on top of that, which is the document above. Removing any
of them stops the block being a code block: `> code block` is a paragraph with an
extra space, and `> code block` and `> code block` are paragraphs as well.
The only document MD027 accepts is the fenced spelling.
## Reach
`main` reports it when the block is the quote's first, which is the document above.
#454 widens that to a block written after a blank quoted line:
```markdown
> Quoted text
>
> code block
```
`3:7` with #454 and nothing before it. mdl reports neither line of this one.
## What the answer might be
Leaving an indented code block's own indentation unmeasured, the way the rule
already leaves the inside of a fenced block alone, and reporting only what the
marker's prefix can be held to. The block's lines are content either way, which
is the same ground as #457: what a code span or a code block owns is not
indentation.
Raised while working on #454.
コントリビューションガイド
評価
この issue はまだ評価されていません。