10

How should Markdown be used with rustdoc to include diagrams or ASCII art?

From reading the manual, triple back-ticks can be used for code-snippets. How do I include literal, non-formatted text?

(Something like Doxygen's <pre>...</pre>)

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
ideasman42
  • 42,413
  • 44
  • 197
  • 320

1 Answers1

15

You use triple graves

```text
like this
```

Note the text. This tells rustdoc to not syntax highlight what's inside; the default is to think it's Rust code.

Steve Klabnik
  • 14,521
  • 4
  • 58
  • 99