# DocWright Markdown corpus

This document is a Markdown *source* in the visual corpus. It exists so that the fidelity pipeline observes the Markdown reader at all: before Phase 31 every corpus document was a DOCX, so four format readers shipped with no rendered coverage whatsoever.

## What this document exercises

The reader's block mapping is the subject: ATX headings at three levels, paragraphs carrying **strong** and *emphasised* runs, a `code span`, an [inline link](https://example.invalid/docs), a block quote, a fenced code block, a bulleted list and an ordered list.

> A block quote becomes paragraphs carrying the Quote style, indented on both sides and set in italics. Nesting is flattened to one level, which is why this quote has only one, and the line above ends in a soft break rather than a paragraph.

### Headings map to styles, not to sizes

The mapping keeps a heading's *identity* rather than its appearance. A heading is a paragraph whose style id is `Heading1`, not one that happens to be large and bold, and that is what makes the export leg able to recover the structure it started from.

### Code keeps its line breaks

A fenced block becomes one paragraph per line, because a code block's line endings are structural: they are the only thing separating two statements, and folding them into one wrapped paragraph would put them at the mercy of the layout engine.

```
var converter = new DocWrightConverter();
using var input = File.OpenRead("report.md");
using var output = File.Create("report.pdf");
converter.Convert(input, output, options);
```

## Lists

A bulleted list, tight, so that its items sit against one another:
* Every list gets its own numbering definition, nested lists included.
* All nine levels are defined even though only one of them is referenced.
* The bullet is Word's own disc, set in Symbol, at every level.

An ordered list, also tight, whose first number is honoured:
1. The abstract numbering is created per list, not per document.
2. A nested list keeps its parent's context and indents one level deeper.
3. The suffix after the marker is a tab, which is how Word writes one.

---

## Character formatting

Emphasis is *italic*, strong emphasis is **bold**, and the two combine into ***both at once***. A `code span` carries the HTMLCode character style and a monospace family, while an [inline link](https://example.invalid/reference) carries the Hyperlink style: underlined and blue.

None of that is inferred from appearance on the way back out; the style ids are what the export leg reads. Everything here renders through the same resolver, layout engine and renderer a DOCX does, because the reader's only job is to produce the document object model those three consume.
