stevedonovan / gentle-intro

A gentle Rust tutorial
MIT License
832 stars 112 forks source link

How to use executable code #90

Closed hasanAjsf closed 5 years ago

hasanAjsf commented 5 years ago

Hi.. well this is not a bug reporting, this is a question and request for assistant.

How you got the you write at .md a:

image

To appear as executable code at the book:

image

What shall I do to write a code like this, I noticed this in many books about rust, but do not know what they call it, and how they do it :)

Thanks

tshepang commented 5 years ago

mdbook does it for you magically, so long as you annotate the code block as rust (look at the source).