akiomik / akiomik/mado

MD027 misses a quoted link reference definition, which comrak leaves no node for

Aberta
#461 0 comentários 0 reações 0 responsáveis Ver no GitHub
bug
Linguagem predominante
Rust
Estrelas
407
Forks
12
Merge médio
5h 45min
PRs com merge (30d)
30

Descrição

MD027 measures the blocks of a blockquote through comrak's children, and a link
reference definition leaves none behind, so a quote written entirely of one is
never measured.

## Reproduction

```markdown
> [ref]: /url
```

Nothing is reported. mdl 0.17.0 reports line 1, and the line has two spaces after
its marker. The same definition after a blank quoted line is silent too:

```markdown
> Quoted text
>
> [ref]: /url
```

## Cause

comrak resolves a link reference definition while parsing and puts no node in the
tree for it. The blockquote of the first document has no children at all:

```text
1:1-1:14 Document
1:1-1:14 BlockQuote
```

MD027 walks `node.children()`, so there is nothing to measure. `Document::lines`
holds the line either way; nothing asks it about this one.

## Reach

Whatever else comrak consumes without a node is in the same position. A quote's
other blocks are unaffected, each of them having a node: the third line of

```markdown
> [ref]: /url
>
> text
```

is reported at `3:4`.

Raised while working on #454, which opened the walk to every child and left this
outside it: there is no child to reach.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.