akiomik / akiomik/mado

MD027 reports the spaces a code span spanning two lines owns

Open
#457 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
409
Forks
12
Avg merge
5h 45m
Merged PRs (30d)
30

Description

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.

Contributor guide

Open the contributing guide

Research direction

Start with the MD027 paragraph branch that measures quoted continuation lines, using the two-line code-span reproduction as the failing case. Compare it with the existing fenced-code-block handling. Done means MD027 no longer reports spaces owned by a spanning code span while ordinary multiple spaces after a blockquote marker remain reported.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.