4 ms·
If they'd used a sane document language like LaTeX instead of markdown, it would have been trivial to actually run the examples on build. Markdown has it's pla
by TylerE 3y ago
If they'd used a sane document language like LaTeX instead of markdown, it would have been trivial to actually run the examples on build.
Markdown has it's place... books is not it.
- cdirkx 3y agoI agree LaTeX has it's uses, but... markdown can also do this trivially. See for example the Rust Book [1], and `cargo test` automatically runs example code in markdown doccomments. [1] https://doc.rust-lang.org/stable/book/ch01-02-hello-world.html https://doc.rust-lang.org/stable/book/ch01-02-hello-world.ht...
- deleted 3y ago[deleted]
- bogeholm 3y agoThe book is written in mdbook which has built-in support for testing Rust examples [0], as well as running examples on the playground [1]. [0]: https://rust-lang.github.io/mdBook/cli/test.html https://rust-lang.github.io/mdBook/cli/test.html [1]: https://rust-lang.github.io/mdBook/format/mdbook.html#rust-playground https://rust-lang.github.io/mdBook/format/mdbook.html#rust-p...