Create book from markdown files. Like Gitbook but implemented in Rust
Go to file
Martin Geisler 217546c2a0 Trim trailing whitespace in Rust code blocks
Before, a code block would always end with a final newline. The
newline was added unconditionally by `hide_lines`.

When the code block is syntax highlighted by highlight.js, this is not
a problem, no empty line is added for a final trailing `\n` character.
However, when the code block is editable and thus handled by the ACE
editor, a trailing newline _is_ significant. I believe this issue is
most closely described by https://github.com/ajaxorg/ace/issues/2083
in the upstream repository.

The effect of the way ACE handles newlines is that a code block like

    <pre>
      Some code
    </pre>

will create an editor with _two_ lines, not just one.

By trimming trailing whitespace, we ensure that we don’t accidentally
create more lines in the ACE editor than necessary.
2022-08-10 03:11:08 +02:00
.github/workflows chore: Upgrade MSRV 2022-03-28 13:06:44 -05:00
ci Update deprecated GitHub Actions commands. 2020-10-08 10:00:06 -07:00
examples refactor: Move from deprecated SubCommand 2022-03-28 13:06:50 -05:00
guide Mention how to uninstall. 2022-06-27 11:10:09 -07:00
src Trim trailing whitespace in Rust code blocks 2022-08-10 03:11:08 +02:00
test_book Add rust specific codeblock examples 2021-10-05 12:11:29 +05:30
tests Test that long words are omitted from the search index. 2022-06-26 12:22:52 +01:00
.gitattributes Explicitly mark fonts and images files as binary (#951) 2019-06-11 21:44:15 +02:00
.gitignore Setup basic structure for test book 2021-10-04 13:14:49 +05:30
CHANGELOG.md Fix typo in changelog 2022-04-15 12:09:31 -07:00
CODE_OF_CONDUCT.md add explicit code of conduct, copying other rust-lang repos 2021-07-26 11:52:24 -07:00
CONTRIBUTING.md Update documentation 2021-12-19 20:26:37 -08:00
Cargo.lock Update pretty_assertions from 0.6.1 to 1.2.1 2022-06-27 13:29:22 -07:00
Cargo.toml Update pretty_assertions from 0.6.1 to 1.2.1 2022-06-27 13:29:22 -07:00
LICENSE Create LICENSE 2015-07-29 01:11:30 +02:00
README.md Update documentation 2021-12-19 20:26:37 -08:00
release.toml Metadata for cargo-release should be in release.toml (#722) 2018-07-09 18:36:55 +08:00
triagebot.toml Add minimal traigebot config 2021-10-27 19:31:08 +05:30

README.md

mdBook

Build Status crates.io LICENSE

mdBook is a utility to create modern online books from Markdown files.

Check out the User Guide for a list of features and installation and usage information. The User Guide also serves as a demonstration to showcase what a book looks like.

If you are interested in contributing to the development of mdBook, check out the Contribution Guide.

License

All the code in this repository is released under the Mozilla Public License v2.0, for more information take a look at the LICENSE file.