# `Nous.Eval.Reporter.Markdown`
[🔗](https://github.com/nyo16/nous/blob/v0.21.1/lib/nous/eval/reporter/markdown.ex#L1)

GitHub-flavoured Markdown report, sized for a pull-request comment.

A comparison shows the verdict and why, the gate metrics with their
intervals and minimum detectable effect, fixed/broken case lists, label
counts, per-scorer pass rates, cost/latency/token deltas, scorer errors by
kind and the fingerprint keys that changed. A run shows its pass rate,
pass@k / pass^k, MDE, per-scorer table, errors and resources.

Options:

  * `:max_cases` - how many case ids to list per group, default `20`;
    the full count is always shown
  * `:heading` - heading level of the title, default `3`

Case ids, scorer names, labels and run ids come from datasets and stored
runs, so they are untrusted: `escape/1` backslash-escapes Markdown
punctuation (a `|` cannot break a table, a backtick cannot open code, `@`
cannot mention), turns `&` into `&amp;` and line breaks into spaces.

# `escape`

```elixir
@spec escape(term()) :: String.t()
```

Escapes untrusted text for Markdown: backslash before ASCII punctuation
that Markdown or GitHub interpret, `&` as `&amp;`, line breaks as spaces.

## Examples

    iex> Nous.Eval.Reporter.Markdown.escape("a|b `c` @team")
    "a\\|b \\`c\\` \\@team"

---

*Consult [api-reference.md](api-reference.md) for complete listing*
