akiomik / akiomik/mado

MD027 reports the spaces a code span spanning two lines owns

未关闭
#457 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Rust
星标
407
派生
12
平均合并
5 小时 45 分钟
30 天内合并 PR
30

描述

A code span that spans two quoted lines owns the spaces after the marker on the
second one, and MD027 reports them.

## Reproduction

```markdown
> `code
> span` tail here
```

`2:4: MD027 Multiple spaces after blockquote symbol` on the branch for #439, and
`2:9` in 0.3.2. mdl 0.17.0 reports line 2 as well.

The code span's content is `code span`, two spaces included: a code span keeps
the line ending as a space and the indentation after it as itself. Removing the
space the report names changes what the document renders, so the report cannot be
acted on.

## Why the rule reads it as indentation

MD027's paragraph branch measures a quoted paragraph's line from the line rather
than from the inlines on it, because `CommonMark` drops the leading spaces of a
paragraph's continuation lines. That holds for the text of a paragraph and not
inside a code span, which is the one inline that keeps what it is written with.

A fenced code block inside a quote is the same situation and is already left
alone, by the branch that handles it rather than by anything that knows why.

## Not urgent

0.3.2 reports the same line, at a different column, and so does mdl, so nothing
regresses while this stands. Raised while fixing #439.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。