MD027 reads indentation past what CommonMark allows before a `>` as a quote prefix
- Dominant language
- Rust
- Stars
- 407
- Forks
- 12
- Avg merge
- 5h 45m
- Merged PRs (30d)
- 30
Description
A line indented four spaces or more before a `>` is paragraph text, not a quoted
line: `CommonMark` allows a blockquote marker at most three spaces of
indentation, and an indented code block cannot interrupt a paragraph. MD027
reports inside such a line anyway.
## Reproduction
```markdown
> Quoted text
> More text
```
`2:8: MD027 Multiple spaces after blockquote symbol` on the branch for #439, and
`2:5` in 0.3.2. The document renders as one paragraph whose text is
`Quoted text\n> More text` — the `>` on line 2 is a literal `>`, and the spaces
after it are the paragraph's own text.
mdl 0.17.0 reports line 2 as well, from `/^\s*(?:>\s?)+\s{2,}\S/`, whose `\s*`
admits any indentation.
## Cause
Both versions read the line as quoted, by different routes. 0.3.2 took the
column of the first inline on the line, which is inside the text. The branch for
#439 counts the markers off the line itself and allows any number of spaces
before one, so it finds a prefix where `CommonMark` finds text.
A bound of three spaces is what the specification says, and it is not the whole
answer: a list item's indentation legitimately pushes a nested quote's marker
further right than that, and `- > first` / ` > second` has to keep reporting
its second line.
## Not urgent
Same line reported before and after #439, and by mdl, so nothing regresses while
this stands; only the column moved. Filing it because the new code reads the
prefix explicitly and could answer the question the old code could not ask.
Contributor guide
Assessment
This issue has not been assessed yet.