217546c2a0
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. |
||
---|---|---|
.github/workflows | ||
ci | ||
examples | ||
guide | ||
src | ||
test_book | ||
tests | ||
.gitattributes | ||
.gitignore | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
Cargo.lock | ||
Cargo.toml | ||
LICENSE | ||
README.md | ||
release.toml | ||
triagebot.toml |
README.md
mdBook
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.